42 256 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

Validity Student's License

The Student license does not expire. However, it is only valid while you are registered in an appropriate degree granting instit...

Validity Student's License

The Student license does not expire. However, it is only valid while you are registered in an appropriate degree granting instit...

environ 4 heures ago | 0

Answered

Guide me what is wrong in this code,i am trying to retrieve 3 values from function and trying to place those values

The beamData Az (acceleration in the Z direction) starts out as all zero. There are no peaks in the first row, so findpeaks() re...

Guide me what is wrong in this code,i am trying to retrieve 3 values from function and trying to place those values

The beamData Az (acceleration in the Z direction) starts out as all zero. There are no peaks in the first row, so findpeaks() re...

environ 4 heures ago | 0

| accepted

Answered

Q. Cannot display summaries of variables i.e. here Y U V with more than 524288 elements.

If you really need those statistics, then you can use min(Y(:)) max(Y(:)) mean(Y(:)) std(Y(:)) at the MATLAB command line. ...

Q. Cannot display summaries of variables i.e. here Y U V with more than 524288 elements.

If you really need those statistics, then you can use min(Y(:)) max(Y(:)) mean(Y(:)) std(Y(:)) at the MATLAB command line. ...

environ 5 heures ago | 0

Answered

How to get data every second from table that has variable sampling time

Create a timetable() object and use retime()

How to get data every second from table that has variable sampling time

Create a timetable() object and use retime()

environ 6 heures ago | 0

Answered

How to change diagnosis path in Matlab.?

That code always tries to save some files such as *-houghpara.mat files in exactly the same directory that the eye images are i...

How to change diagnosis path in Matlab.?

That code always tries to save some files such as *-houghpara.mat files in exactly the same directory that the eye images are i...

environ 6 heures ago | 0

Answered

Image conversion to RGB

With difficulty. You would have to do something like xcorr2 in order to locate stats(K).Image within the label image. It is a l...

Image conversion to RGB

With difficulty. You would have to do something like xcorr2 in order to locate stats(K).Image within the label image. It is a l...

environ 8 heures ago | 0

| accepted

Answered

I am trying to accomplish this same task using the find() command but I'm not sure how.

Hint: t = 1:1.5:20; output = zeros(size(t)); ind = find(t >= 3 & t <= 9); output(ind) = sin(t(ind)); ind = setdiff(1:numel(...

I am trying to accomplish this same task using the find() command but I'm not sure how.

Hint: t = 1:1.5:20; output = zeros(size(t)); ind = find(t >= 3 & t <= 9); output(ind) = sin(t(ind)); ind = setdiff(1:numel(...

environ 10 heures ago | 0

Answered

For live scripts, using the LaTex equations, how to represent the absolute value?

Apparently it is not easy to do "properly"; see https://tex.stackexchange.com/questions/43008/absolute-value-symbols What might...

For live scripts, using the LaTex equations, how to represent the absolute value?

Apparently it is not easy to do "properly"; see https://tex.stackexchange.com/questions/43008/absolute-value-symbols What might...

environ 12 heures ago | 0

Answered

Is there a way to limit the "solve" function to converge only to a real solution (no imaginary or complex numbers)?

No, there is not. vpasolve() permits ranges to be specified for each value. vpasolve() will typically only find one solution Y...

Is there a way to limit the "solve" function to converge only to a real solution (no imaginary or complex numbers)?

No, there is not. vpasolve() permits ranges to be specified for each value. vpasolve() will typically only find one solution Y...

environ 12 heures ago | 0

| accepted

Answered

Is it possible to organize parfor outputs based on the "thread" number?

Use a parallel queue or pollable queue https://www.mathworks.com/help/parallel-computing/send.html#bvl84az-pollablequeue to send...

Is it possible to organize parfor outputs based on the "thread" number?

Use a parallel queue or pollable queue https://www.mathworks.com/help/parallel-computing/send.html#bvl84az-pollablequeue to send...

environ 15 heures ago | 0

Answered

If statement matching numbers

sum(ismember(user_numbers, lotto_numbers)) gives the number of matches. Around here, matching 3 only gets you a free ticket, ...

If statement matching numbers

sum(ismember(user_numbers, lotto_numbers)) gives the number of matches. Around here, matching 3 only gets you a free ticket, ...

environ 19 heures ago | 0

| accepted

Answered

How to specify the location to save video using VideoWriter?

In the place you have 'MyVideo.avi' specify the directory name too in the normal way for your system.

How to specify the location to save video using VideoWriter?

In the place you have 'MyVideo.avi' specify the directory name too in the normal way for your system.

environ 19 heures ago | 0

| accepted

Answered

How to prevent conv2d from changing image size

conv2(A, B, 'same') or conv2(A, B, 'valid')

How to prevent conv2d from changing image size

conv2(A, B, 'same') or conv2(A, B, 'valid')

1 jour ago | 0

| accepted

Answered

Adding new field to structure array

Not really. You could reduce by one line by using a = num2cell(arrayfun(fun, [s.f1], [s.f2])); for whatever that is worth. Yo...

Adding new field to structure array

Not really. You could reduce by one line by using a = num2cell(arrayfun(fun, [s.f1], [s.f2])); for whatever that is worth. Yo...

1 jour ago | 1

Answered

Installing Matlab in a pen-drive

Often pen drives mount in Linux with the no execute option. Also it is not uncommon to need to sudo sh ./install My understa...

Installing Matlab in a pen-drive

Often pen drives mount in Linux with the no execute option. Also it is not uncommon to need to sudo sh ./install My understa...

1 jour ago | 0

Answered

Which version can support the naming of m files in Chinese and the use of space naming?

On all versions, function names (and the last component of the names of .m files) can only use A-Z, a-z, 0-9, and underscore. I...

Which version can support the naming of m files in Chinese and the use of space naming?

On all versions, function names (and the last component of the names of .m files) can only use A-Z, a-z, 0-9, and underscore. I...

1 jour ago | 0

| accepted

Answered

Cannot find a license for distrib_computing_toolbox

Your session is configured so that your default parallel pool is on a remote system, but you do not have (an available) license ...

Cannot find a license for distrib_computing_toolbox

Your session is configured so that your default parallel pool is on a remote system, but you do not have (an available) license ...

1 jour ago | 0

Answered

Using fprintf to output %e with one decimal point

You cannot get two digits before the decimal place in a %e format. You also cannot skip the sign after the E. Also, for large en...

Using fprintf to output %e with one decimal point

You cannot get two digits before the decimal place in a %e format. You also cannot skip the sign after the E. Also, for large en...

1 jour ago | 0

Answered

how to know if image is rgb?

For some kinds of image files, it is not possible to be sure. You can try using imfinfo() on the image file, and looking for th...

how to know if image is rgb?

For some kinds of image files, it is not possible to be sure. You can try using imfinfo() on the image file, and looking for th...

1 jour ago | 0

Answered

How to skip the division of zero in three summation term.

syms n M N F = n-M-N; Fz = piecewise(F == 0, 0, 1/F); T = symsum( symsum( symsum( Fz, n, 1, 3), M, 1, 3), N, 1, 3)

How to skip the division of zero in three summation term.

syms n M N F = n-M-N; Fz = piecewise(F == 0, 0, 1/F); T = symsum( symsum( symsum( Fz, n, 1, 3), M, 1, 3), N, 1, 3)

1 jour ago | 0

| accepted

Answered

How to save matrix to .dat file in standard notation

You cannot do that using save -ascii: save -ascii uses a fixed format. Probably the easest way is filename = sprintf('output=%...

How to save matrix to .dat file in standard notation

You cannot do that using save -ascii: save -ascii uses a fixed format. Probably the easest way is filename = sprintf('output=%...

1 jour ago | 0

| accepted

Answered

I need help building a dynamically evolving matrix based on a polynomial of unknown or user inputted size.

xv = x(:); yv = y(:); X = []; deg = 0; while true X = [X, xv.^deg]; coeffs = X \ yv; residue = sum( (polyval(...

I need help building a dynamically evolving matrix based on a polynomial of unknown or user inputted size.

xv = x(:); yv = y(:); X = []; deg = 0; while true X = [X, xv.^deg]; coeffs = X \ yv; residue = sum( (polyval(...

1 jour ago | 0

Answered

range2time is not working?

range2time requires the Phased Array Toolbox, R2012b or later.

range2time is not working?

range2time requires the Phased Array Toolbox, R2012b or later.

1 jour ago | 0

| accepted

Answered

how can I output an option from menu after the user has selected an option

materials = {'ash', 'hicory', 'maple', 'pine'}); BatMa = menu('choose the bat material', materials); if BatMa == 0; error('can...

how can I output an option from menu after the user has selected an option

materials = {'ash', 'hicory', 'maple', 'pine'}); BatMa = menu('choose the bat material', materials); if BatMa == 0; error('can...

1 jour ago | 0

Answered

Can any one help me on this

Code is attached. I had to guess about what you were trying to do. One of your cases leaves m undefined. That case occurs for y...

Can any one help me on this

Code is attached. I had to guess about what you were trying to do. One of your cases leaves m undefined. That case occurs for y...

1 jour ago | 1

Answered

Code for laser ablation of material

Something like initialize mass initialize velocity while velocity < target decrease mass increase velocity by force...

Code for laser ablation of material

Something like initialize mass initialize velocity while velocity < target decrease mass increase velocity by force...

1 jour ago | 0

Answered

Adding Zeros vectors within a matrix

A2 = zeros(5,5); A2([1:2, 5], [1:2, 5]) = A;

Adding Zeros vectors within a matrix

A2 = zeros(5,5); A2([1:2, 5], [1:2, 5]) = A;

1 jour ago | 2

| accepted

Answered

who to make code in gui work in any image the user input?

Same cause as for your slightly earlier and very similar posting. https://www.mathworks.com/matlabcentral/answers/457700-i-hav...

who to make code in gui work in any image the user input?

Same cause as for your slightly earlier and very similar posting. https://www.mathworks.com/matlabcentral/answers/457700-i-hav...

1 jour ago | 0

Answered

i have code in gui and if condition does's work why? please help me

radial basis networks are function approximations, and will seldom return exact integers -- especially since we do not know that...

i have code in gui and if condition does's work why? please help me

radial basis networks are function approximations, and will seldom return exact integers -- especially since we do not know that...

1 jour ago | 0