Answered

Trying to create a table with a char array as variable names

This demo creates the table you described using random text. histcounts is used to count the number of each letter. The counts...

Trying to create a table with a char array as variable names

This demo creates the table you described using random text. histcounts is used to count the number of each letter. The counts...

13 days ago | 0

Answered

how do you define a matrix and its variable

Learn about preallocation. Options: i = 4; j = 3; M = nan(i,j) M = ones(i,j) M = zeros(i,j)

how do you define a matrix and its variable

Learn about preallocation. Options: i = 4; j = 3; M = nan(i,j) M = ones(i,j) M = zeros(i,j)

13 days ago | 0

Answered

how do i create a concentric black and white circles on a color image with different brightness

This uses the gray colormap. n = 20; % number of circles r = [1,10]; % [smallest, largest] radius center = [0,0]; % cen...

how do i create a concentric black and white circles on a color image with different brightness

This uses the gray colormap. n = 20; % number of circles r = [1,10]; % [smallest, largest] radius center = [0,0]; % cen...

13 days ago | 0

Answered

How do I start a function at the exact computer clock time?

> How do I start a function at the exact computer clock time? It depends on how you define "exact" and "start". If "start" m...

How do I start a function at the exact computer clock time?

> How do I start a function at the exact computer clock time? It depends on how you define "exact" and "start". If "start" m...

13 days ago | 0

| accepted

Answered

I have to select mode from matrix with sliding window of 3X3. How to do that?

n*m sliding mode; slides by intervals of 1 This computes the sliding mode within a 2D window that slides by 1 unit horizontally...

I have to select mode from matrix with sliding window of 3X3. How to do that?

n*m sliding mode; slides by intervals of 1 This computes the sliding mode within a 2D window that slides by 1 unit horizontally...

13 days ago | 1

| accepted

Answered

"Index exceeds the number of array elements (2)" when it shouldn't?

It looks like this for k = (((j - 1)*5000) + 1):(j*5000) a(k) = y(k); end could be replaced with k = (((j - 1)*5000)...

"Index exceeds the number of array elements (2)" when it shouldn't?

It looks like this for k = (((j - 1)*5000) + 1):(j*5000) a(k) = y(k); end could be replaced with k = (((j - 1)*5000)...

13 days ago | 0

| accepted

Answered

How to separate and order timetable data by year

> I now want to be able to obtain a metric for each year and to do this i will need to separate the data into years, keeping th...

How to separate and order timetable data by year

> I now want to be able to obtain a metric for each year and to do this i will need to separate the data into years, keeping th...

13 days ago | 0

Answered

Creating a table with only headers

To create an emtpy table with 4 headers, T = array2table(nan(0,4), 'VariableNames', {'Observations', 'Mean', 'Treatment', 'Res...

Creating a table with only headers

To create an emtpy table with 4 headers, T = array2table(nan(0,4), 'VariableNames', {'Observations', 'Mean', 'Treatment', 'Res...

13 days ago | 1

| accepted

Answered

How to download Matlab Version 2021a

Download previous releases here https://www.mathworks.com/products/new_products/previous_release_overview.html

How to download Matlab Version 2021a

Download previous releases here https://www.mathworks.com/products/new_products/previous_release_overview.html

13 days ago | 0

Answered

How to compare the index values in the different matrices

See isequal. or ismember Demo: a = [2 3 4] b = sqrt(a) ismember(a,b) To understand why your conditional statement does n...

How to compare the index values in the different matrices

See isequal. or ismember Demo: a = [2 3 4] b = sqrt(a) ismember(a,b) To understand why your conditional statement does n...

19 days ago | 0

| accepted

Answered

How to recursively reduce the function arguments

x1 = rand(1); x2 = rand(1); x3 = rand(1); x4 = rand(1); p = [x1, x2, x3, x4]; f5([p,1]) p = [x1, x2, x3]; f5([p,1]) ...

How to recursively reduce the function arguments

x1 = rand(1); x2 = rand(1); x3 = rand(1); x4 = rand(1); p = [x1, x2, x3, x4]; f5([p,1]) p = [x1, x2, x3]; f5([p,1]) ...

19 days ago | 0

Answered

How can I plot a 2D variable with a slider for the 3rd dimension?

This demo produces data as you described and a slider is used to select the 3rd dimension of the data to be plotted. data = r...

How can I plot a 2D variable with a slider for the 3rd dimension?

This demo produces data as you described and a slider is used to select the 3rd dimension of the data to be plotted. data = r...

20 days ago | 0

| accepted

Answered

Remove the Last Entry of Many Fields of a Structure

dataTrimmed = structfun(@(s)s(1:end-1),data,'UniformOutput',false);

Remove the Last Entry of Many Fields of a Structure

dataTrimmed = structfun(@(s)s(1:end-1),data,'UniformOutput',false);

20 days ago | 0

| accepted

Answered

Why the Vertical Coverage button does not appear in my radar designer app?

The image from the R2021a documentation does not include that button which probably means it became available in R2021b. R20...

Why the Vertical Coverage button does not appear in my radar designer app?

The image from the R2021a documentation does not include that button which probably means it became available in R2021b. R20...

20 days ago | 0

Answered

Plot numbers in geoplot

Specifying the coordinates in geoplots can be tricky since. Don't forget that South and West are negative values. See this demo...

Plot numbers in geoplot

Specifying the coordinates in geoplots can be tricky since. Don't forget that South and West are negative values. See this demo...

20 days ago | 0

Answered

Correlation regression lines between two parameters

Common methods of adding a simple linear regression line 1. Use lsline which will add a regression line for each set of data in...

Correlation regression lines between two parameters

Common methods of adding a simple linear regression line 1. Use lsline which will add a regression line for each set of data in...

20 days ago | 1

Answered

How to remove NaN cells inside a structure with several cell arrays inside?

You can't remove the NaN values without changing the shape of the data. You could replace the NaN values with a different place...

How to remove NaN cells inside a structure with several cell arrays inside?

You can't remove the NaN values without changing the shape of the data. You could replace the NaN values with a different place...

20 days ago | 0

Submitted

craters

Generates a cratered spherical surface such as a moon or asteroid.

21 days ago | 2 downloads |

Answered

Link Geoplot zoom to subplots

Yes, this is complicated. The goal would be to link the axis limits (linaxes) but ... Latitude in non-linear in geoaxes The...

Link Geoplot zoom to subplots

Yes, this is complicated. The goal would be to link the axis limits (linaxes) but ... Latitude in non-linear in geoaxes The...

21 days ago | 1

Answered

How to extract certain values in an array

Use datetime values instead of any other form of date/time. That allows you to easily index by hour etc. % Load the data ...

How to extract certain values in an array

Use datetime values instead of any other form of date/time. That allows you to easily index by hour etc. % Load the data ...

27 days ago | 1

| accepted

Answered

How do you set a default datatip callback function?

> I'm trying to add callback code to a scatterplot that activates when the use clicks on a data point > I want to set a default...

How do you set a default datatip callback function?

> I'm trying to add callback code to a scatterplot that activates when the use clicks on a data point > I want to set a default...

27 days ago | 0

Answered

How do you set a default datatip callback function?

It doesn't appear that there is a factory CreateFcn for Data Tips and its default value is an empty character array (''). The ...

How do you set a default datatip callback function?

It doesn't appear that there is a factory CreateFcn for Data Tips and its default value is an empty character array (''). The ...

1 month ago | 1

Answered

Copy axes to uiaxes

Use copyobj instead to copy the entire external axes to a uipanel in your app. Demo: % Simulate the app with a uifigure and ...

Copy axes to uiaxes

Use copyobj instead to copy the entire external axes to a uipanel in your app. Demo: % Simulate the app with a uifigure and ...

1 month ago | 0

| accepted

Answered

bootstrap regression giving 2 different answers, not sure why

According to the bootstrp documentation, bootfun should be a function handle but bootstrp merely calls feval which accepts chara...

bootstrap regression giving 2 different answers, not sure why

According to the bootstrp documentation, bootfun should be a function handle but bootstrp merely calls feval which accepts chara...

2 months ago | 0

| accepted

Answered

fprint f help with printing a list

In Matlab R2021a or later, you can use formattedDisplayText() to convert the matrix to a string. See this community highlight f...

fprint f help with printing a list

In Matlab R2021a or later, you can use formattedDisplayText() to convert the matrix to a string. See this community highlight f...

2 months ago | 0

Answered

How to select multiple sets of data points from a scatter plot (like gating in flow cytometry/cell sorting)?

Using the slope and y-intercept of each reference line, determine which points contain y-values less than the upper line and whi...

How to select multiple sets of data points from a scatter plot (like gating in flow cytometry/cell sorting)?

Using the slope and y-intercept of each reference line, determine which points contain y-values less than the upper line and whi...

2 months ago | 0

| accepted

Answered

How to create an image that has random chunks of black and white pixels

Specify imageSize and blockScale to create randomly placed blocks of black and white pixels. imageSize = [1920,1080]; ...

How to create an image that has random chunks of black and white pixels

Specify imageSize and blockScale to create randomly placed blocks of black and white pixels. imageSize = [1920,1080]; ...

2 months ago | 0

| accepted

Answered

How to change heatmap xtick labels? Also, how to overlay (hold on) some dots over the heatmap?

Heatmaps are difficult to modify and customize. I recommend using imagesc() instead. See inline comments below and additional ...

How to change heatmap xtick labels? Also, how to overlay (hold on) some dots over the heatmap?

Heatmaps are difficult to modify and customize. I recommend using imagesc() instead. See inline comments below and additional ...

2 months ago | 0

| accepted

Answered

How to compute the average path from scattered data (and its variance)?

It looks like the following assumptions can be made: The robot starts at the same location There is a uniform temporal samplin...

How to compute the average path from scattered data (and its variance)?

It looks like the following assumptions can be made: The robot starts at the same location There is a uniform temporal samplin...

2 months ago | 0

Answered

Clipping Surface Plots When Plotting Large Volumes

TL;DR: When the coordinates for the red-dotted sphere are expanded, the axis limits are updated. The new x-axis limits clip th...

Clipping Surface Plots When Plotting Large Volumes

TL;DR: When the coordinates for the red-dotted sphere are expanded, the axis limits are updated. The new x-axis limits clip th...

2 months ago | 0