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...

2 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...

2 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...

2 mois ago | 1

| accepted

Answered

Plotting three axis with one y axis

See this comment that lists links to many examples to follow. But before proceeding, are you convinced that this is the best ...

Plotting three axis with one y axis

See this comment that lists links to many examples to follow. But before proceeding, are you convinced that this is the best ...

2 mois ago | 0

Answered

How to extend array from end of that array to known value?

Assuming A is a row vector and you'd like to add 218 values that extend from the end of A to 0.512, Aextension = linspace(A(end...

How to extend array from end of that array to known value?

Assuming A is a row vector and you'd like to add 218 values that extend from the end of A to 0.512, Aextension = linspace(A(end...

2 mois ago | 0

| accepted

Answered

for each loop take the increasing position of a vector matlab?

The length of L would need to equal the length of x or it could be longer than x, but not shorter. for i=1:lenght(x) if x...

for each loop take the increasing position of a vector matlab?

The length of L would need to equal the length of x or it could be longer than x, but not shorter. for i=1:lenght(x) if x...

2 mois ago | 0

| accepted

Answered

Stacking Multiple 2D plots in one 3D plot

Check out the following resources. If you get stuck implementing a solution, share your updated code and we can help you get un...

Stacking Multiple 2D plots in one 3D plot

Check out the following resources. If you get stuck implementing a solution, share your updated code and we can help you get un...

2 mois ago | 0

| accepted

Answered

Is there a better way to animate a figure with AppDesigner?

It looks nice but it's very inefficient. On each iteration you're throwing out everything and rebuilding it from scratch. See ...

Is there a better way to animate a figure with AppDesigner?

It looks nice but it's very inefficient. On each iteration you're throwing out everything and rebuilding it from scratch. See ...

3 mois ago | 0

| accepted

Answered

Add a user define property to freehand object

You could apply your own rotation using a rotation matrix. % anonymous function to center the obj at (0,0), % rotate it, an...

Add a user define property to freehand object

You could apply your own rotation using a rotation matrix. % anonymous function to center the obj at (0,0), % rotate it, an...

3 mois ago | 0

Answered

d = daq("directsound") yields "Unrecognized function or variable 'daq'"

daq() was released in R2020a which is vs. 4.1 of the Data Acquisition Toolbox.

d = daq("directsound") yields "Unrecognized function or variable 'daq'"

daq() was released in R2020a which is vs. 4.1 of the Data Acquisition Toolbox.

3 mois ago | 0

| accepted

Answered

plot a hexagonal figure

th = linspace(0,2*pi,7) + pi/6; x = sin(th); y = cos(th); figure() tiledlayout(1,2) nexttile() plot(x,y,'k-o','markerS...

plot a hexagonal figure

th = linspace(0,2*pi,7) + pi/6; x = sin(th); y = cos(th); figure() tiledlayout(1,2) nexttile() plot(x,y,'k-o','markerS...

3 mois ago | 1

| accepted

Answered

copy Freehand object from a figure and pate into another figure

You could use copyobj(z,ax) where z is an existing freehand object or a freehand object saved to a mat file and ax is the handle...

copy Freehand object from a figure and pate into another figure

You could use copyobj(z,ax) where z is an existing freehand object or a freehand object saved to a mat file and ax is the handle...

3 mois ago | 0

Answered

Display three 2D images into 3D space

pcolor does not support 3D coordinates so you'll have to use surf with flattened values along one of the dimensions for each pla...

Display three 2D images into 3D space

pcolor does not support 3D coordinates so you'll have to use surf with flattened values along one of the dimensions for each pla...

3 mois ago | 0

| accepted

Answered

How to get brushed data point index from Plot?

Continuing from your code... brushedPoints = [brushed_x(:), brushed_y(:), brushed_z(:)]; dist = pdist2([xd(:),yd(:),zd(:)], br...

How to get brushed data point index from Plot?

Continuing from your code... brushedPoints = [brushed_x(:), brushed_y(:), brushed_z(:)]; dist = pdist2([xd(:),yd(:),zd(:)], br...

3 mois ago | 1

| accepted

Answered

App Designer 2020a: synchronizing UIAxes

You specified using Matlab R2020A which prevents you from using the new LimitsChangedFcn available in R2021a and onward which wo...

App Designer 2020a: synchronizing UIAxes

You specified using Matlab R2020A which prevents you from using the new LimitsChangedFcn available in R2021a and onward which wo...

3 mois ago | 0

Answered

How to calculate the number of consecutive negative values in an array before a positive appears?

c = [-0.4607 -0.4659 -0.5165 -0.5168 -0.5164 -0.4626 -0.4668 -0.3730 -0.3426 0.3224 ,... 0.3251 0.3270 ...

How to calculate the number of consecutive negative values in an array before a positive appears?

c = [-0.4607 -0.4659 -0.5165 -0.5168 -0.5164 -0.4626 -0.4668 -0.3730 -0.3426 0.3224 ,... 0.3251 0.3270 ...

3 mois ago | 0

Answered

3Dplot suggestions on azimuthal data

There are lots of 3D plots. Here are two examples using a 3D bar plot and a 3D surface. data = [ 45 33 25 60 32 34 50 9 ...

3Dplot suggestions on azimuthal data

There are lots of 3D plots. Here are two examples using a 3D bar plot and a 3D surface. data = [ 45 33 25 60 32 34 50 9 ...

3 mois ago | 0

| accepted

Answered

App designer - Automatically scale app to the size of the screen it is used on

Select Auto Resize Children from the property inspector (see screenshot). It's also worth your time to read through other opti...

App designer - Automatically scale app to the size of the screen it is used on

Select Auto Resize Children from the property inspector (see screenshot). It's also worth your time to read through other opti...

3 mois ago | 0

| accepted

Answered

Obtaining the Gaussian equation for a distribution

This demo creates a noisy gaussian with unknown random parameters and then fits the data using lsqnonlin. 1. Create noisy gaus...

Obtaining the Gaussian equation for a distribution

This demo creates a noisy gaussian with unknown random parameters and then fits the data using lsqnonlin. 1. Create noisy gaus...

3 mois ago | 0

Answered

save multiple gui window in appdesigner

In the m-file, before creating the first figure, store a list of pre-existing figures. Hint: findobj(0,'type','figure') After c...

save multiple gui window in appdesigner

In the m-file, before creating the first figure, store a list of pre-existing figures. Hint: findobj(0,'type','figure') After c...

3 mois ago | 0

Answered

Creating a cell for each plot grid

At first I would like to display an empty graph spaced by 2. For this purpose both axes have value from 0 to 10 stepped by 2. ...

Creating a cell for each plot grid

At first I would like to display an empty graph spaced by 2. For this purpose both axes have value from 0 to 10 stepped by 2. ...

3 mois ago | 0

| accepted

Answered

combining 4 csv files with and without headers

You can use outerjoin to join the first 2 tables into 1 table. It's not entirely clear how you're indexing the 3rd table into t...

combining 4 csv files with and without headers

You can use outerjoin to join the first 2 tables into 1 table. It's not entirely clear how you're indexing the 3rd table into t...

3 mois ago | 0

Answered

Goodness of fit , residual plot for fminbnd fitting

See matlab's documentation on goodness of fit. There are lots of options and you've got all the variables you need to move forw...

Goodness of fit , residual plot for fminbnd fitting

See matlab's documentation on goodness of fit. There are lots of options and you've got all the variables you need to move forw...

3 mois ago | 1

| accepted

Answered

Trying to shift/recenter map and data

You can wrap your longitudinal values to [-180,180] using wrapTo180() which requires the mapping toolbox. Or you could use wrap...

Trying to shift/recenter map and data

You can wrap your longitudinal values to [-180,180] using wrapTo180() which requires the mapping toolbox. Or you could use wrap...

3 mois ago | 0

| accepted

Answered

How to customise legend?

A clean and efficient approach is to assign the display names to the scatter objects and then specify the handles to include in ...

How to customise legend?

A clean and efficient approach is to assign the display names to the scatter objects and then specify the handles to include in ...

3 mois ago | 0

| accepted

Answered

How can I set a minimum window size for an app developed in app designer?

Set the minimum size as an app property named minSize defined by 1x2 vector describing the minimum [width, height] (see how to d...

How can I set a minimum window size for an app developed in app designer?

Set the minimum size as an app property named minSize defined by 1x2 vector describing the minimum [width, height] (see how to d...

3 mois ago | 0

| accepted

Answered

Splitapply: Returning multiple output values

Use arrayfun instead. A = array2table(rand(100,1)); A.Properties.VariableNames{1} = 'Row1'; A.Row2 = rand(100,1); B = [1:1:1...

Splitapply: Returning multiple output values

Use arrayfun instead. A = array2table(rand(100,1)); A.Properties.VariableNames{1} = 'Row1'; A.Row2 = rand(100,1); B = [1:1:1...

4 mois ago | 2

Answered

if and switch statement

To answer your question, you would use case num2cell(1:50) But a switch/case is not the optimal method in this context. What...

if and switch statement

To answer your question, you would use case num2cell(1:50) But a switch/case is not the optimal method in this context. What...

4 mois ago | 1

| accepted

Answered

How to draw perpendicular line from scatter points in 2-D plot

How to plot horizontal and vertical lines from axes to data point clf() ax = gca(); hold(gca,'on') x=[0:0.02:2]; y=sin...

How to draw perpendicular line from scatter points in 2-D plot

How to plot horizontal and vertical lines from axes to data point clf() ax = gca(); hold(gca,'on') x=[0:0.02:2]; y=sin...

4 mois ago | 0

| accepted

Answered

How do I rename each individual item in a column in one function?

Create a list of the new names within a cell array and then use deal to distribute the list to the label fields. Demo: D.tria...

How do I rename each individual item in a column in one function?

Create a list of the new names within a cell array and then use deal to distribute the list to the label fields. Demo: D.tria...

4 mois ago | 0