41,781 total contributions since 2011

I do not do free private consulting. If you want to bring my attention to something, send a link to the MATLAB Answers location.

Answered

function calling toolboox use

XRMLread is from a completely different toolbox. http://www.xray.cz/xrdmlread/

function calling toolboox use

XRMLread is from a completely different toolbox. http://www.xray.cz/xrdmlread/

10 hours ago | 0

Answered

loop in realtime arduino reading

Use a timer object with FixedRate . Be sure to pre-allocate c. You might have some difficulty reaching 50 readings per second o...

loop in realtime arduino reading

Use a timer object with FixedRate . Be sure to pre-allocate c. You might have some difficulty reaching 50 readings per second o...

11 hours ago | 0

Answered

point coordinates from different domains

X = 1:0.5:10; Y = 0:0.2:25; Z = 0:0.1:4; [x, y, z] = ndgrid(X, Y, Z); pointsize = 15; scatter3(x(:), y(:), z(:), pointsize);

point coordinates from different domains

X = 1:0.5:10; Y = 0:0.2:25; Z = 0:0.1:4; [x, y, z] = ndgrid(X, Y, Z); pointsize = 15; scatter3(x(:), y(:), z(:), pointsize);

11 hours ago | 0

| accepted

Answered

Error finding matrix indices where elements obey a condition

B = isAlways(A>0); will give you a logical result. Or you could B = logical(A>0);

Error finding matrix indices where elements obey a condition

B = isAlways(A>0); will give you a logical result. Or you could B = logical(A>0);

11 hours ago | 0

Answered

Error using images.internal.imageDisplayParsePVPairs in Matlab

The code uses an old parameter for imshow() that was removed a number of years ago. The line 133 needs to be changed to refImgH...

Error using images.internal.imageDisplayParsePVPairs in Matlab

The code uses an old parameter for imshow() that was removed a number of years ago. The line 133 needs to be changed to refImgH...

11 hours ago | 0

| accepted

Answered

How can I find the difference between points of two matrices if the indices do not match?

pdist2() and look for the minimum distance. Or, sortrows() both of them and assume that they match up after that.

How can I find the difference between points of two matrices if the indices do not match?

pdist2() and look for the minimum distance. Or, sortrows() both of them and assume that they match up after that.

12 hours ago | 0

Answered

How to get a plot handle by ginput

What should be added is ButtonDownFcn callbacks on ah, bh, ch . Otherwise you have to do a bunch of work figuring out which lin...

How to get a plot handle by ginput

What should be added is ButtonDownFcn callbacks on ah, bh, ch . Otherwise you have to do a bunch of work figuring out which lin...

12 hours ago | 0

| accepted

Answered

Hi, can Anyone please help me to solve this error.

ClassificationSVM is the constructor. You probably want to use predict() Note: showplot is an option for the previous generatio...

Hi, can Anyone please help me to solve this error.

ClassificationSVM is the constructor. You probably want to use predict() Note: showplot is an option for the previous generatio...

12 hours ago | 0

Answered

Is NVIDIA Quadro P500 good enough to use parallel computing toolbox?

Yes, the Quadro P500 is only about a year old and should work well. (It is CUDA Capacity 6.1)

Is NVIDIA Quadro P500 good enough to use parallel computing toolbox?

Yes, the Quadro P500 is only about a year old and should work well. (It is CUDA Capacity 6.1)

12 hours ago | 0

Answered

How do is code this last summation? I was able to do the first one but have no clue how to finish it?

%input values y = 4; n = 1; L = 3; z = 17; %equations c = @(x, y, n, l, i) atand(abs((x-l./(2.*n).*(2*i-1)))./y); p = @...

How do is code this last summation? I was able to do the first one but have no clue how to finish it?

%input values y = 4; n = 1; L = 3; z = 17; %equations c = @(x, y, n, l, i) atand(abs((x-l./(2.*n).*(2*i-1)))./y); p = @...

14 hours ago | 1

Answered

How do I apply a function in accumarray that calls another variable

Nth = @(v,N) v(N); output = splitapply(@(t,x) Nth(polyder(polyfit(t, x, 2))),2), T, X, bin_number)

How do I apply a function in accumarray that calls another variable

Nth = @(v,N) v(N); output = splitapply(@(t,x) Nth(polyder(polyfit(t, x, 2))),2), T, X, bin_number)

16 hours ago | 0

Answered

Indexing with conditions for certain columns

matches_median = bsxfun(@eq, MaT_All, Median_All); matches_one = find(sum(matches_median,2) == 1); matches_which = 1 + sum( cu...

Indexing with conditions for certain columns

matches_median = bsxfun(@eq, MaT_All, Median_All); matches_one = find(sum(matches_median,2) == 1); matches_which = 1 + sum( cu...

17 hours ago | 0

Answered

How do i remove boarders between matlab commands

https://www.mathworks.com/matlabcentral/answers/48029-how-to-turn-off-cell-mode-in-matlab-editor-in-2012b#answer_59110 Sean sug...

How do i remove boarders between matlab commands

https://www.mathworks.com/matlabcentral/answers/48029-how-to-turn-off-cell-mode-in-matlab-editor-in-2012b#answer_59110 Sean sug...

20 hours ago | 0

| accepted

Answered

how can i plot equation with more details

plot() with xlabel(), ylabel(), title(). text() to write extra things. In some cases you might want to go as far as annotation('...

how can i plot equation with more details

plot() with xlabel(), ylabel(), title(). text() to write extra things. In some cases you might want to go as far as annotation('...

20 hours ago | 1

Answered

Is there a way to represent an #ifdef statement in a simulink model?

Simulink has conditionals, and Simulink has triggered subsystems, but those require that the control variable be defined (but ca...

Is there a way to represent an #ifdef statement in a simulink model?

Simulink has conditionals, and Simulink has triggered subsystems, but those require that the control variable be defined (but ca...

20 hours ago | 0

| accepted

Answered

Solving non-linear equations using symbolic variables, jacobian, fsolve.

Your x0 has more than one value. That tells us that your function is a function of multiple variables. fsolve() passes all of th...

Solving non-linear equations using symbolic variables, jacobian, fsolve.

Your x0 has more than one value. That tells us that your function is a function of multiple variables. fsolve() passes all of th...

21 hours ago | 0

Answered

<1x1 struct> unsupported class

Class string is considered a MATLAB object, it appears. You might have to convert to cell array of character vector.

<1x1 struct> unsupported class

Class string is considered a MATLAB object, it appears. You might have to convert to cell array of character vector.

22 hours ago | 0

Answered

Is it possible to use appdesigner tool box in matlab R2015a version

No. It needs R2016a or later.

Is it possible to use appdesigner tool box in matlab R2015a version

No. It needs R2016a or later.

1 day ago | 1

| accepted

Answered

What does i mean as example: 1.2428 - 0.0003i

In this context i is the imaginary unit. Those are all complex numbers, such as complex(1.2428, -0.003)

What does i mean as example: 1.2428 - 0.0003i

In this context i is the imaginary unit. Those are all complex numbers, such as complex(1.2428, -0.003)

1 day ago | 0

Answered

Delete words from a sentence (remove characters from a character array)

regexprep() strrep() strfind() to locate and then delete as appropriate However! The examples do not match the text of the re...

Delete words from a sentence (remove characters from a character array)

regexprep() strrep() strfind() to locate and then delete as appropriate However! The examples do not match the text of the re...

1 day ago | 1

Answered

How to solve the "Not enough input arguments" in bvp4c ?

http://www.mathworks.com/help/matlab/math/parameterizing-functions.html

How to solve the "Not enough input arguments" in bvp4c ?

http://www.mathworks.com/help/matlab/math/parameterizing-functions.html

1 day ago | 0

Answered

Removing vertical line from the script window

That only applies to comments, not to commands. But to turn it off, use Preferences -> Editor/Debugger -> Language, and turn off...

Removing vertical line from the script window

That only applies to comments, not to commands. But to turn it off, use Preferences -> Editor/Debugger -> Language, and turn off...

1 day ago | 0

Answered

How to extract all the diagonal blocks of size 2x2 from NxN matrix?

temp = repmat({ones(2,2)}, 1, 20); L = blkdiag(temp{:}); output = reshape(A(L), 2, 2, []); This will produce a 2 x 2 x 20 res...

How to extract all the diagonal blocks of size 2x2 from NxN matrix?

temp = repmat({ones(2,2)}, 1, 20); L = blkdiag(temp{:}); output = reshape(A(L), 2, 2, []); This will produce a 2 x 2 x 20 res...

2 days ago | 0

Answered

Can I use Optimization tool like fmincon or ga etc if I have constraint optimization problem that optimization variable cannot be within a range inside upper and lower limit?

You could use the nonlinear constraints for that, but it is unlikely to work at all well. Instead, run the problem once for eac...

Can I use Optimization tool like fmincon or ga etc if I have constraint optimization problem that optimization variable cannot be within a range inside upper and lower limit?

You could use the nonlinear constraints for that, but it is unlikely to work at all well. Instead, run the problem once for eac...

2 days ago | 0

Answered

Solving for a variable with varying parameters in the sum

You cannot. That describes an infinite summation where you need to solve all infinite I_m values. You cannot truncate it becaus...

Solving for a variable with varying parameters in the sum

You cannot. That describes an infinite summation where you need to solve all infinite I_m values. You cannot truncate it becaus...

2 days ago | 0

Answered

Plotting 3D for three independent variables without any function

For a typical surface map, you would use interpolated_z = griddata(X, Y, Z, query_x, query_y); surf(query_x, query_y, interp...

Plotting 3D for three independent variables without any function

For a typical surface map, you would use interpolated_z = griddata(X, Y, Z, query_x, query_y); surf(query_x, query_y, interp...

2 days ago | 0

| accepted

Answered

Running the cloud-based MATLAB for an extended period of time

There is no way to increase or disable the idle time for MATLAB Online. The closest you can get is to use a tool that automatic...

Running the cloud-based MATLAB for an extended period of time

There is no way to increase or disable the idle time for MATLAB Online. The closest you can get is to use a tool that automatic...

2 days ago | 1

| accepted

Answered

How can I row-normalize a symmetric matrix so each row sums to 1?

The below does retain symmetry. I am not positive at the moment that it would work for matrix that have non-zero entries on th...

How can I row-normalize a symmetric matrix so each row sums to 1?

The below does retain symmetry. I am not positive at the moment that it would work for matrix that have non-zero entries on th...

2 days ago | 0

Answered

time animation of a 3D matrix

Q = size(A,3); W = A(:,:,1); h = pcolor(W); drawnow(); pause(0.3); for K = 2 : Q W = A(:,:,K); set(h, 'CData', W)...

time animation of a 3D matrix

Q = size(A,3); W = A(:,:,1); h = pcolor(W); drawnow(); pause(0.3); for K = 2 : Q W = A(:,:,K); set(h, 'CData', W)...

2 days ago | 0

| accepted

Answered

how to convert color of a pixel gray to red

rgbimage = im2double( repmat(grayscaleImage, 1, 1, 3) ); rgbimage(some_row, some_column, 1) = 1; %R rgbimage(some_row, some_c...

how to convert color of a pixel gray to red

rgbimage = im2double( repmat(grayscaleImage, 1, 1, 3) ); rgbimage(some_row, some_column, 1) = 1; %R rgbimage(some_row, some_c...

2 days ago | 0