Answered

App Designer. Should I use app functions or external fuctions?

> I noticed that the "same" operations are now much slower and crashing more often than when I was not using the App designer, s...

App Designer. Should I use app functions or external fuctions?

> I noticed that the "same" operations are now much slower and crashing more often than when I was not using the App designer, s...

3 mois ago | 1

| accepted

Answered

Remove trailing zeros while making matrix

When combining real and compex numbers within a single array, the array will appear in compex format. Here are some ways to form...

Remove trailing zeros while making matrix

When combining real and compex numbers within a single array, the array will appear in compex format. Here are some ways to form...

3 mois ago | 0

| accepted

Answered

How to return an array without points in the edge?

Use the logical outputs to the inpolygon function. [in,on] = inpolygon (kn, xq ,xv, yv); on indicates all data that are on the...

How to return an array without points in the edge?

Use the logical outputs to the inpolygon function. [in,on] = inpolygon (kn, xq ,xv, yv); on indicates all data that are on the...

3 mois ago | 0

Answered

Figure in a tab group in app designer

> is there any other reason to call 'm' files instead of just putting the code in that callback? IMO there are 2 reasons to c...

Figure in a tab group in app designer

> is there any other reason to call 'm' files instead of just putting the code in that callback? IMO there are 2 reasons to c...

3 mois ago | 0

Answered

How to find the intersection a root locus plot and a line with specific angle?

There may be an analytical approach that would be better than this approach but one way to do it is to get the handle of the blu...

How to find the intersection a root locus plot and a line with specific angle?

There may be an analytical approach that would be better than this approach but one way to do it is to get the handle of the blu...

3 mois ago | 0

| accepted

Answered

How to make vertical stripes line contour plot?

dt = datetime(01,01,2000) + calmonths(0:59); % row vector vals = rand(size(dt))*6-3; % vector (row or col) plot(dt,vals,'ks') ...

How to make vertical stripes line contour plot?

dt = datetime(01,01,2000) + calmonths(0:59); % row vector vals = rand(size(dt))*6-3; % vector (row or col) plot(dt,vals,'ks') ...

3 mois ago | 0

| accepted

Answered

How can i plot a boundary line in contour plot

Copy of original code with the following changes. contour(k_x,k_y,g,500) chaanged to contour(k_x,k_y,real(g),500) Commented...

How can i plot a boundary line in contour plot

Copy of original code with the following changes. contour(k_x,k_y,g,500) chaanged to contour(k_x,k_y,real(g),500) Commented...

3 mois ago | 0

| accepted

Answered

How to avoid clearing workspace in MATLAB App button ?

> I want it should work on matlab workspace . Bad idea. This defeats the purpose of an app which is to allow users to interact...

How to avoid clearing workspace in MATLAB App button ?

> I want it should work on matlab workspace . Bad idea. This defeats the purpose of an app which is to allow users to interact...

3 mois ago | 0

| accepted

Answered

polarplot app.panel with condition in app designer

I think the problem is that you're not specifying the axes but that doesn't explain why a blue dot appears and you should have s...

polarplot app.panel with condition in app designer

I think the problem is that you're not specifying the axes but that doesn't explain why a blue dot appears and you should have s...

3 mois ago | 0

| accepted

Answered

my plot won't show graph

That's because there's only 1 point and it takes >=2 points to form a line. By default, plot() does not show markers, only line...

my plot won't show graph

That's because there's only 1 point and it takes >=2 points to form a line. By default, plot() does not show markers, only line...

3 mois ago | 1

| accepted

Answered

How to create a secondary Cartesian coordinate system (three perpendicular coordinate axes) in Matlab?

To add the additional axis lines, box on % Or box(ax, 'on') % ax is the axis handle but I didn't understand this part: w...

How to create a secondary Cartesian coordinate system (three perpendicular coordinate axes) in Matlab?

To add the additional axis lines, box on % Or box(ax, 'on') % ax is the axis handle but I didn't understand this part: w...

3 mois ago | 1

| accepted

Answered

How to use logical indexing for slices of a 3D matrix

nxm logical index applied to all pages of a 3D array domain = rand(4,4,4); condition1 = domain(:,:,1).*ones(size(domain)) > 0....

How to use logical indexing for slices of a 3D matrix

nxm logical index applied to all pages of a 3D array domain = rand(4,4,4); condition1 = domain(:,:,1).*ones(size(domain)) > 0....

3 mois ago | 0

| accepted

Answered

How to get values from multiple columns based on the values of one column ?

This is how I imagine your data are organized based on your description. % [year, month, data, ...] data = [repelem((2007:2...

How to get values from multiple columns based on the values of one column ?

This is how I imagine your data are organized based on your description. % [year, month, data, ...] data = [repelem((2007:2...

4 mois ago | 0

Answered

how can I read the number in figure(matlab) without rounding?

This is a precision issue with datatips. See this answer to learn how to specify the level of precision in datatips. Demo of ...

how can I read the number in figure(matlab) without rounding?

This is a precision issue with datatips. See this answer to learn how to specify the level of precision in datatips. Demo of ...

4 mois ago | 1

| accepted

Answered

highlight different data on the same graph

It looks like you're using datetime values and if you're not, you should be. Datetime values are not represented by strings. A ...

highlight different data on the same graph

It looks like you're using datetime values and if you're not, you should be. Datetime values are not represented by strings. A ...

4 mois ago | 1

Answered

cell2mat -> operation -> mat2cell : How...?

for i=1:301 % generate the cell array example dataset u{1,i}=rand(41,50); end u_3d = cat(3,u{:}); u_3dFilt = medfilt3...

cell2mat -> operation -> mat2cell : How...?

for i=1:301 % generate the cell array example dataset u{1,i}=rand(41,50); end u_3d = cat(3,u{:}); u_3dFilt = medfilt3...

4 mois ago | 0

| accepted

Answered

unable to make invisible for edit box in gui.

> when users choose radiobutton1, this edit box should be invisible Then you need to move your line of code from the edit1_Call...

unable to make invisible for edit box in gui.

> when users choose radiobutton1, this edit box should be invisible Then you need to move your line of code from the edit1_Call...

4 mois ago | 0

| accepted

Answered

How can I get the sums of all possible combinations of the values of a vector?

% Input: v, a row or column vector v = [2 4 6 8]; % create permutations and summation results n = numel(v); vIdx = 1:...

How can I get the sums of all possible combinations of the values of a vector?

% Input: v, a row or column vector v = [2 4 6 8]; % create permutations and summation results n = numel(v); vIdx = 1:...

4 mois ago | 0

| accepted

Answered

Create output of rectangles with 200 different colours

rectangle('Position',pos) pos is a 1x4 vector defining [LeftSide, BottomSide, Width, Height]. See the FaceColor and EdgeColor...

Create output of rectangles with 200 different colours

rectangle('Position',pos) pos is a 1x4 vector defining [LeftSide, BottomSide, Width, Height]. See the FaceColor and EdgeColor...

4 mois ago | 0

Answered

xcorr can't be used

xcorr does not require Signal Processing Toobox in Matlab R2019a and later. For Matlab releases prior to 19a,, you'll need th...

xcorr can't be used

xcorr does not require Signal Processing Toobox in Matlab R2019a and later. For Matlab releases prior to 19a,, you'll need th...

4 mois ago | 0

Answered

How to control the pushbutton in a while loop in Matlab GUI

> I would like to run the loop each time only when I click the pushbutton. I don't know whether you're using app designer, GUI...

How to control the pushbutton in a while loop in Matlab GUI

> I would like to run the loop each time only when I click the pushbutton. I don't know whether you're using app designer, GUI...

4 mois ago | 1

| accepted

Answered

What is the fastest way to find zeros and ones indices in a 3D binary array?

Here are two versions of your code that are faster than the original but they only shave off a sliver of time. I've timed 10 re...

What is the fastest way to find zeros and ones indices in a 3D binary array?

Here are two versions of your code that are faster than the original but they only shave off a sliver of time. I've timed 10 re...

4 mois ago | 0

| accepted

Answered

Count frequencies of occurence using both text and number

Use groupsummary % Produce table % I use categorical variables but you can you strings or char-vectors rng('default') % for r...

Count frequencies of occurence using both text and number

Use groupsummary % Produce table % I use categorical variables but you can you strings or char-vectors rng('default') % for r...

4 mois ago | 0

| accepted

Answered

Dot indexing is not supported for variables of this type.

> I am trying to recursively search directories and build a list of paths to image files Inputs: % Define the main directory...

Dot indexing is not supported for variables of this type.

> I am trying to recursively search directories and build a list of paths to image files Inputs: % Define the main directory...

4 mois ago | 1

| accepted

Answered

How can you sum up all vectors from a quiver plot?

This solution computes the vector sum of all quiver vectors in the test image and then computes the 95% confidence interval (CI...

How can you sum up all vectors from a quiver plot?

This solution computes the vector sum of all quiver vectors in the test image and then computes the 95% confidence interval (CI...

4 mois ago | 0

Submitted

Example: Dashcam optic flow using Computer Vision Toolbox

A brief description of the steps needed to produce an optic flow field from dashcam footage using Matlab's Computer Vision Toolb...

4 mois ago | 2 downloads |

Answered

Want to remove one plot from the two plots in my app designer pannel when i choose Synthesis

A simple and efficient solution would be to assign the lower plot to a uipanel in app designer and to set the visibility of the ...

Want to remove one plot from the two plots in my app designer pannel when i choose Synthesis

A simple and efficient solution would be to assign the lower plot to a uipanel in app designer and to set the visibility of the ...

4 mois ago | 1

Answered

Results from a loop in one table

As you noted, the second line of code in your for-loop should be moved outside and prior to the for-loop. However, there are tw...

Results from a loop in one table

As you noted, the second line of code in your for-loop should be moved outside and prior to the for-loop. However, there are tw...

4 mois ago | 0

| accepted

Answered

Plot Matrix as Heatmap with different cell size width

Not possible with heatmap. Here's a solution using surf. % Inputs data = [ 1 2 3; 4 5 6]; rowWidths = [10, 20]; %mm, one f...

Plot Matrix as Heatmap with different cell size width

Not possible with heatmap. Here's a solution using surf. % Inputs data = [ 1 2 3; 4 5 6]; rowWidths = [10, 20]; %mm, one f...

4 mois ago | 0

| accepted

Answered

putting space between string and double using fprintf

> In the first code, 10 spaces were added before 'G1' That's incorrect. 8 spaces are added prior to 'G1'. From the documentat...

putting space between string and double using fprintf

> In the first code, 10 spaces were added before 'G1' That's incorrect. 8 spaces are added prior to 'G1'. From the documentat...

4 mois ago | 1

| accepted