Answered

Array indices must be positive integers or logical values

The problem lies here: for i = 1:N za(i) = (z(i+1) - z(i-1))/(2*h); end When the loop starts out, what is i? i is 1, ri...

Array indices must be positive integers or logical values

The problem lies here: for i = 1:N za(i) = (z(i+1) - z(i-1))/(2*h); end When the loop starts out, what is i? i is 1, ri...

21 hours ago | 0

Answered

Help fitting data to an implicit equation

My thought would be the lazy solution. If your model is: ((1-y)^(1-b)/y)=exp(-kt) then log the model. That is, we know tha...

Help fitting data to an implicit equation

My thought would be the lazy solution. If your model is: ((1-y)^(1-b)/y)=exp(-kt) then log the model. That is, we know tha...

1 day ago | 0

Answered

How can I interpolate between my original endpoints with cscvn?

I think you do not understand splines. (Not uncommon.) Splines have the property that they can produce results that lie outsid...

How can I interpolate between my original endpoints with cscvn?

I think you do not understand splines. (Not uncommon.) Splines have the property that they can produce results that lie outsid...

1 day ago | 0

Answered

Function fitting on a set of data points

What did you do wrong? It looks like Jon may be correct, in that you did not use the newly estimated set of parameters from the ...

Function fitting on a set of data points

What did you do wrong? It looks like Jon may be correct, in that you did not use the newly estimated set of parameters from the ...

3 days ago | 0

| accepted

Answered

Question About Number Format in MATLAB Command Window

These are numbers from the symbolic toolbox. That toolbox does not use the format tools to display numbers (though perhaps argua...

Question About Number Format in MATLAB Command Window

These are numbers from the symbolic toolbox. That toolbox does not use the format tools to display numbers (though perhaps argua...

3 days ago | 1

| accepted

Answered

How to Use "Ask a Question" Section Correctly?

It looks like this is a (surely quickly fixed) bug in the site itself. They recently made some changes, allowing users to use ...

How to Use "Ask a Question" Section Correctly?

It looks like this is a (surely quickly fixed) bug in the site itself. They recently made some changes, allowing users to use ...

3 days ago | 1

Answered

Precision (decimal digits) are very low and digits(32) does not help.

Of course, asking for 32 or more digits of precision is a bit on the side of the ridiculous, when the numbers going into the com...

Precision (decimal digits) are very low and digits(32) does not help.

Of course, asking for 32 or more digits of precision is a bit on the side of the ridiculous, when the numbers going into the com...

4 days ago | 0

Answered

how do i download the function kstest_2s_2d?

You click on the link that says download, from this page. https://www.mathworks.com/matlabcentral/fileexchange/38617-kstest_2s_...

how do i download the function kstest_2s_2d?

You click on the link that says download, from this page. https://www.mathworks.com/matlabcentral/fileexchange/38617-kstest_2s_...

5 days ago | 0

Answered

array and inverse tan

I think you do not unerstand MATLAB. I'd start with taking the Onramp tutorial. atand of what? atand is a FUNCTION. You need to...

array and inverse tan

I think you do not unerstand MATLAB. I'd start with taking the Onramp tutorial. atand of what? atand is a FUNCTION. You need to...

6 days ago | 0

| accepted

Answered

for loop help - Newton's method

I agree with much of what David has written (except for one thing). If you wish, feel free to accept his answer, as long as you ...

for loop help - Newton's method

I agree with much of what David has written (except for one thing). If you wish, feel free to accept his answer, as long as you ...

6 days ago | 0

Answered

Aerofoil graph interpolation/extrapolation

You lack sufficient information to construct a meaningful surface, since you have only 2 pieces of information in terms of Reyno...

Aerofoil graph interpolation/extrapolation

You lack sufficient information to construct a meaningful surface, since you have only 2 pieces of information in terms of Reyno...

6 days ago | 1

| accepted

Answered

how do i generate a torus?

WAY too much effort here to generate a torus. Start here: https://en.wikipedia.org/wiki/Torus [theta,phi] = meshgrid(linspace(...

how do i generate a torus?

WAY too much effort here to generate a torus. Start here: https://en.wikipedia.org/wiki/Torus [theta,phi] = meshgrid(linspace(...

6 days ago | 1

Answered

Using fminbnd on a Function with Multiple Outputs

Just evaluate your function one more time, after the optimization is done when you have the minimal location for x. This last ti...

Using fminbnd on a Function with Multiple Outputs

Just evaluate your function one more time, after the optimization is done when you have the minimal location for x. This last ti...

7 days ago | 0

Answered

get several answers with solve

There is no analytical solution. syms x solve(cos(x)*cosh(x)+1==0) Warning: Unable to solve symbolically. Returning a numeric...

get several answers with solve

There is no analytical solution. syms x solve(cos(x)*cosh(x)+1==0) Warning: Unable to solve symbolically. Returning a numeric...

7 days ago | 0

Answered

Want to find exact answer for symbolic variable polynomial factorization

You say this is a polynomial. It cannot be a polynomial in c or n, since c and n live in the exponentis of p. Therefore you are ...

Want to find exact answer for symbolic variable polynomial factorization

You say this is a polynomial. It cannot be a polynomial in c or n, since c and n live in the exponentis of p. Therefore you are ...

7 days ago | 0

Answered

Reduced Echelon form is wrong

A = [-2 2;-.4 .2]; [V,D] = eig(A) V = -0.974588432346814 -0.754384720454159 -0.224003097156669 ...

Reduced Echelon form is wrong

A = [-2 2;-.4 .2]; [V,D] = eig(A) V = -0.974588432346814 -0.754384720454159 -0.224003097156669 ...

8 days ago | 0

Answered

Making complex number to trigonometric formula

Since this is clearly homework... Hint: what does angle do? (atan2 would also suffice, but then you would need to know how to e...

Making complex number to trigonometric formula

Since this is clearly homework... Hint: what does angle do? (atan2 would also suffice, but then you would need to know how to e...

8 days ago | 0

| accepted

Answered

Find the volume under a 3D surface

Since this appears to be a gridded surface, then you can just use trapz, twice. Call it once on the x dimension, and once on the...

Find the volume under a 3D surface

Since this appears to be a gridded surface, then you can just use trapz, twice. Call it once on the x dimension, and once on the...

8 days ago | 0

Answered

How to contour this use matlab?

Are you asking how to write the code to take scattered data, and derive contours from pairs of points, using some variation of t...

How to contour this use matlab?

Are you asking how to write the code to take scattered data, and derive contours from pairs of points, using some variation of t...

9 days ago | 1

Answered

Generate random numbers in the second decimal point

Something like this is about the noise you want to see in that digit. If it is too large, then multiply by a little smaller numb...

Generate random numbers in the second decimal point

Something like this is about the noise you want to see in that digit. If it is too large, then multiply by a little smaller numb...

10 days ago | 0

Answered

Error using betainc Z must be real and non-negative/polyfitn

You have 4 data points. You are trying to estimate a model with how many unknown coefficients? (20. Yes. 20.) I won't even get...

Error using betainc Z must be real and non-negative/polyfitn

You have 4 data points. You are trying to estimate a model with how many unknown coefficients? (20. Yes. 20.) I won't even get...

10 days ago | 0

Answered

How to find eigenvectors?

Why does V seem strange? A = [-2 0 2 2 -1 5 0 ...

How to find eigenvectors?

Why does V seem strange? A = [-2 0 2 2 -1 5 0 ...

11 days ago | 1

Answered

How to define a variable without using syms ?

fun = @(lambda) det(A - lambda*eye(size(A))); fun is a function of the unknown variable lambda. It is a function handle. It has...

How to define a variable without using syms ?

fun = @(lambda) det(A - lambda*eye(size(A))); fun is a function of the unknown variable lambda. It is a function handle. It has...

12 days ago | 0

Answered

null(Matrix) returns an empty vector

That null returns an empty vector merely means your matrix is full rank. You cannot compute a non-empty null space of a full ran...

null(Matrix) returns an empty vector

That null returns an empty vector merely means your matrix is full rank. You cannot compute a non-empty null space of a full ran...

14 days ago | 1

| accepted

Answered

solution giving me imaginary answers.. Help me with this.

To be more clear, equations 5,6,8,9 merely establish the value of y1,y2,T,A. eqn5= y1-0.6==0; eqn6= y1+y2-1==0; eqn8= T==318....

solution giving me imaginary answers.. Help me with this.

To be more clear, equations 5,6,8,9 merely establish the value of y1,y2,T,A. eqn5= y1-0.6==0; eqn6= y1+y2-1==0; eqn8= T==318....

15 days ago | 0

Answered

proble with differential equation

What did you do wrong? You wrote this: dsolve(diff(diff(f))+3*diff(f)==12*x-5), f(0) == 1, Df(0)== 0 And how is that different...

proble with differential equation

What did you do wrong? You wrote this: dsolve(diff(diff(f))+3*diff(f)==12*x-5), f(0) == 1, Df(0)== 0 And how is that different...

15 days ago | 0

Answered

Matlab 2020b won't open on Mac OS Big Sur

The simple solution of course to resolve any problems is to use R2021. It seems to run nicely on Big Sur. That is, given we are ...

Matlab 2020b won't open on Mac OS Big Sur

The simple solution of course to resolve any problems is to use R2021. It seems to run nicely on Big Sur. That is, given we are ...

15 days ago | 0

Answered

How to solve integral ==

You want to integrate exp(x), with limits from 1 to b?, and then to find b, such that the integral is 1? First, how do we perfo...

How to solve integral ==

You want to integrate exp(x), with limits from 1 to b?, and then to find b, such that the integral is 1? First, how do we perfo...

15 days ago | 0

Answered

Problems with Solving inequalities in matlab

That is not an error. It is a warning message, telling you there is a problem with what you have posed to solve. There is no ex...

Problems with Solving inequalities in matlab

That is not an error. It is a warning message, telling you there is a problem with what you have posed to solve. There is no ex...

16 days ago | 1

Answered

solutions via vpasolve of an irradical equation

vpasolve is a NUMERICAL solver in general. As such, it can generate only one solution to a general nonlinear equation. That solu...

solutions via vpasolve of an irradical equation

vpasolve is a NUMERICAL solver in general. As such, it can generate only one solution to a general nonlinear equation. That solu...

16 days ago | 0

| accepted