Answered

implement first kind bessel function

Not exactly. Although -J1 is the derivative of J0, that does not mean that J1 = -besselj(1,x), it means that J1 = besselj(1,x) a...

implement first kind bessel function

Not exactly. Although -J1 is the derivative of J0, that does not mean that J1 = -besselj(1,x), it means that J1 = besselj(1,x) a...

5 days ago | 1

| accepted

Answered

What is the best syntax to use for dVph/dλ?

No, if you are working numerically use gradient() If you are working symbolically then diff(Vph(lambda), lambda)

What is the best syntax to use for dVph/dλ?

No, if you are working numerically use gradient() If you are working symbolically then diff(Vph(lambda), lambda)

5 days ago | 0

Answered

Exported formulas on excel sheets resulted in text which would not be evaluated automatically

That post does not say that the formulas will be executable once written by xlswrite. None of the table based operations such...

Exported formulas on excel sheets resulted in text which would not be evaluated automatically

That post does not say that the formulas will be executable once written by xlswrite. None of the table based operations such...

5 days ago | 0

| accepted

Answered

Using broadcasting array variable values as indexes

In that code you cannot eliminate the broadcast variables. If the arrays are large then there could potentially be a fair ove...

Using broadcasting array variable values as indexes

In that code you cannot eliminate the broadcast variables. If the arrays are large then there could potentially be a fair ove...

5 days ago | 0

| accepted

Answered

Simulink Fixed Point vs Fixed point toolbox

https://www.mathworks.com/help/simulink/fixed-point.html Simulation with fixed point requires the Fixed Point Designer Toolbo...

Simulink Fixed Point vs Fixed point toolbox

https://www.mathworks.com/help/simulink/fixed-point.html Simulation with fixed point requires the Fixed Point Designer Toolbo...

5 days ago | 0

| accepted

Answered

How can I pass variables to eval without error suppression ?

sprintf('%g', a, b); This will not work for non-numeric variables.

How can I pass variables to eval without error suppression ?

sprintf('%g', a, b); This will not work for non-numeric variables.

5 days ago | 0

Answered

directed diffusion routing algorithm using matlab

Okay, go ahead. Let us know if you encounter any error messages you do not understand.

directed diffusion routing algorithm using matlab

Okay, go ahead. Let us know if you encounter any error messages you do not understand.

5 days ago | 0

| accepted

Answered

How to replace complex numbers in a column vector with 0.000+0.000i ?

Supposing the values are stored in fft_A then fft_A(2:4) = 0; is enough. When you display fft_A afterwards you will see the c...

How to replace complex numbers in a column vector with 0.000+0.000i ?

Supposing the values are stored in fft_A then fft_A(2:4) = 0; is enough. When you display fft_A afterwards you will see the c...

5 days ago | 0

| accepted

Answered

Why is the length of these two variables are different?

You do not truncate ACCN down to length c. ACCN had been 11 long because of the previous iterations; now only 10 are needed but ...

Why is the length of these two variables are different?

You do not truncate ACCN down to length c. ACCN had been 11 long because of the previous iterations; now only 10 are needed but ...

5 days ago | 1

| accepted

Answered

How to maintain NaN after calculations in tables?

T.new(rows) = T.height(rows); nanrows = isnan(T.Age); T.new(nanrows) = nan;

How to maintain NaN after calculations in tables?

T.new(rows) = T.height(rows); nanrows = isnan(T.Age); T.new(nanrows) = nan;

5 days ago | 0

| accepted

Answered

How to pad empty cells with the last number in the row?

FirstN = @(v,N) v(1:N); PadLastN = @(v,N) FirstN([v, repmat(v(end),1,N)],N); WS = cellfun( @(C) PadLastN(C, maxLengthCell), ...

How to pad empty cells with the last number in the row?

FirstN = @(v,N) v(1:N); PadLastN = @(v,N) FirstN([v, repmat(v(end),1,N)],N); WS = cellfun( @(C) PadLastN(C, maxLengthCell), ...

5 days ago | 1

| accepted

Answered

Finding Complex root for the nonlinear equation with single variable

There is no fzero() command that can work. You have a vector of 3 equations that are inconsistent with each other. And if you we...

Finding Complex root for the nonlinear equation with single variable

There is no fzero() command that can work. You have a vector of 3 equations that are inconsistent with each other. And if you we...

5 days ago | 0

Answered

Adding Hexadecimal numbers?

If there is a possibility that the user might enter hex values with more than 53 significant bits then you should use sscanf wit...

Adding Hexadecimal numbers?

If there is a possibility that the user might enter hex values with more than 53 significant bits then you should use sscanf wit...

5 days ago | 1

Answered

how to sum all pixel within a specific distance from each pixel?

conv2 with a mask that is 1 for each pixel to be considered. The exact pattern will depend on which distance measurement you wan...

how to sum all pixel within a specific distance from each pixel?

conv2 with a mask that is 1 for each pixel to be considered. The exact pattern will depend on which distance measurement you wan...

6 days ago | 0

Answered

Can Matlab distinguish between meaningful and meaningless strings?

The field of study of rigorously distinguishing between "meaningful" sentences and those that are not, is called Logical Positiv...

Can Matlab distinguish between meaningful and meaningless strings?

The field of study of rigorously distinguishing between "meaningful" sentences and those that are not, is called Logical Positiv...

6 days ago | 0

Answered

Could anyone suggest me is there any way of choosing maximum and minimum values together

https://www.mathworks.com/help/matlab/ref/bounds.html [A_min, A_max] = bounds(A)

Could anyone suggest me is there any way of choosing maximum and minimum values together

https://www.mathworks.com/help/matlab/ref/bounds.html [A_min, A_max] = bounds(A)

6 days ago | 2

Answered

How can I insert a smaller ones matrix into a larger zeros matrix?

A(starting_row : ending_row, starting_column : ending_column) = constant_to_fill_with * ones(number_of_rows, number_of_columns);...

How can I insert a smaller ones matrix into a larger zeros matrix?

A(starting_row : ending_row, starting_column : ending_column) = constant_to_fill_with * ones(number_of_rows, number_of_columns);...

6 days ago | 0

Answered

How can I fix this code?

fprintf('%-15s%-12s\n', 'PRICE', 'QUANTITY'); fprintf('%-15.2f%-12f', pq1, pq2); This likely to be disconcerting to the users,...

How can I fix this code?

fprintf('%-15s%-12s\n', 'PRICE', 'QUANTITY'); fprintf('%-15.2f%-12f', pq1, pq2); This likely to be disconcerting to the users,...

6 days ago | 0

Answered

How can I save just the values of a structure in a .mat file?

I would like to be sure that I understand what you are asking. You have two structures that happen to have 5 fields each. You w...

How can I save just the values of a structure in a .mat file?

I would like to be sure that I understand what you are asking. You have two structures that happen to have 5 fields each. You w...

6 days ago | 0

Answered

How to turn NaN values in only numerical columns into -999?

fillmissing(T1,'constant',{-999,-999,-999,'NaN'}) Note that this will use the character vector 'NaN' (three characters) in plac...

How to turn NaN values in only numerical columns into -999?

fillmissing(T1,'constant',{-999,-999,-999,'NaN'}) Note that this will use the character vector 'NaN' (three characters) in plac...

6 days ago | 0

Answered

Finding Complex root for the nonlinear equation with single variable

Your function returns three outputs for each input y, and the three outputs each have two complex solutions. There is no single ...

Finding Complex root for the nonlinear equation with single variable

Your function returns three outputs for each input y, and the three outputs each have two complex solutions. There is no single ...

6 days ago | 0

Answered

How to plot unit square using single matrix, to apply transformation matrices onto it.

Is it possible to plot a unit square using just a single matrix, such that transformation matrices can be applied to it and refl...

How to plot unit square using single matrix, to apply transformation matrices onto it.

Is it possible to plot a unit square using just a single matrix, such that transformation matrices can be applied to it and refl...

6 days ago | 0

Answered

Subplot problem - plots are on top of each other?

subplot(1,2,1); h1 = axes; The subplot() call creates an axes that covers half of the figure. The axes() call creates an axes ...

Subplot problem - plots are on top of each other?

subplot(1,2,1); h1 = axes; The subplot() call creates an axes that covers half of the figure. The axes() call creates an axes ...

6 days ago | 0

| accepted

Answered

Read 2 frames simultaneously from same video

frameRGB = readFrame(Video); while hasFrame(Video) frameRGB2 = readFrame(Video); %now process like you did frame...

Read 2 frames simultaneously from same video

frameRGB = readFrame(Video); while hasFrame(Video) frameRGB2 = readFrame(Video); %now process like you did frame...

6 days ago | 1

| accepted

Answered

how to find inverse

target_value = 2; inverse_for_target = fzero(@(x) f(x)-target_value, initial_guess);

how to find inverse

target_value = 2; inverse_for_target = fzero(@(x) f(x)-target_value, initial_guess);

6 days ago | 0

Answered

Alpha Blending 2 Matrix Images

Create a binary matrix in the shape of the oval. Take its complement. bwdistgeodesic() with the uncomplemented version. You now ...

Alpha Blending 2 Matrix Images

Create a binary matrix in the shape of the oval. Take its complement. bwdistgeodesic() with the uncomplemented version. You now ...

6 days ago | 0

| accepted

Answered

imfill() causes error in padarray

That line of code does not occur in Mathwork's padarray() in your release. I suspect that you have a third-party padarray.m wh...

imfill() causes error in padarray

That line of code does not occur in Mathwork's padarray() in your release. I suspect that you have a third-party padarray.m wh...

7 days ago | 0

| accepted

Answered

Error: Attempt to execute SCRIPT Update_V_Jacobi_Metal_box as a function

You used Update_V_Jacobi_Metal_box as the name of your script. That prevents MATLAB from finding the function Update_V_Jacobi...

Error: Attempt to execute SCRIPT Update_V_Jacobi_Metal_box as a function

You used Update_V_Jacobi_Metal_box as the name of your script. That prevents MATLAB from finding the function Update_V_Jacobi...

7 days ago | 1

| accepted

Answered

While loop doesn't terminate

http://matlab.wikia.com/wiki/FAQ#Why_is_0.3_-_0.2_-_0.1_.28or_similar.29_not_equal_to_zero.3F

While loop doesn't terminate

http://matlab.wikia.com/wiki/FAQ#Why_is_0.3_-_0.2_-_0.1_.28or_similar.29_not_equal_to_zero.3F

7 days ago | 0