Answered

How do I check the compatibility of legacy MATLAB 2012b code with new versions of MATLAB?

Sorry. There is no tool that will scan through your code and automatically tell you what parts will run or not, at least not bey...

How do I check the compatibility of legacy MATLAB 2012b code with new versions of MATLAB?

Sorry. There is no tool that will scan through your code and automatically tell you what parts will run or not, at least not bey...

8 hours ago | 0

Answered

Volume Segmenter App not available

This is almost certainly not a problem per se, except for people who have older releases of MATLAB, or who completely lack the I...

Volume Segmenter App not available

This is almost certainly not a problem per se, except for people who have older releases of MATLAB, or who completely lack the I...

8 hours ago | 1

Answered

How to know if a minimum found with Global Search is actually the Global minimum?

Bjorn and Stephen should be encouraged to make their comments into Answers. But let me expand on what they have both said. The ...

How to know if a minimum found with Global Search is actually the Global minimum?

Bjorn and Stephen should be encouraged to make their comments into Answers. But let me expand on what they have both said. The ...

12 hours ago | 1

| accepted

Answered

initial condition ODE45?

You cannot. That is to say, not directly. I suppose you could formulate it as a shooting method, in which case it becomes a nonl...

initial condition ODE45?

You cannot. That is to say, not directly. I suppose you could formulate it as a shooting method, in which case it becomes a nonl...

1 day ago | 0

Answered

A QR complexity question

(Good points made by Bruno. This answer tries to dive a little more deeply than Bruno spent the time to do, but I really don't c...

A QR complexity question

(Good points made by Bruno. This answer tries to dive a little more deeply than Bruno spent the time to do, but I really don't c...

1 day ago | 2

Answered

Explanation of the following eval expression

Lol. Whoever wrote the code should learn to use MATLAB, as this is just an abuse of eval, for absolutely no good reason. For ex...

Explanation of the following eval expression

Lol. Whoever wrote the code should learn to use MATLAB, as this is just an abuse of eval, for absolutely no good reason. For ex...

2 days ago | 2

Answered

simulate a markov chain including the absorbing state "death"

You won't always eventually die? While there are ways for that to not happen eventually, usually they are the plot of some movie...

simulate a markov chain including the absorbing state "death"

You won't always eventually die? While there are ways for that to not happen eventually, usually they are the plot of some movie...

2 days ago | 0

| accepted

Answered

Is this code efficient to generate the Lagrange polynomial?

Is your code efficient to generate something you should not be doing in the first place? Note that a Lagrange interpolating poly...

Is this code efficient to generate the Lagrange polynomial?

Is your code efficient to generate something you should not be doing in the first place? Note that a Lagrange interpolating poly...

3 days ago | 0

Answered

Using fzero for intesection and "integral" for area calculation

g=@(x)exp((-x.^2)./2); h=@(x) x.^2-4.*x; x=linspace(-1,5,100); plot(x,g(x)); hold on plot(x,h(x)); You did that much cor...

Using fzero for intesection and "integral" for area calculation

g=@(x)exp((-x.^2)./2); h=@(x) x.^2-4.*x; x=linspace(-1,5,100); plot(x,g(x)); hold on plot(x,h(x)); You did that much cor...

4 days ago | 0

Answered

Guess for fsolve returns similar answer (heavily non-linear equations)

We don't see your equations. Almost certainly, they are pretty nasty looking. You tell us the exit flag was -2. That flag says ...

Guess for fsolve returns similar answer (heavily non-linear equations)

We don't see your equations. Almost certainly, they are pretty nasty looking. You tell us the exit flag was -2. That flag says ...

4 days ago | 1

Answered

How can I use symbolic variables while solving problems of MATLAB Cody?

I recall that Cody disallows the use of essentially all toolboxes. Symbolic variables are only active for you, IF you have the s...

How can I use symbolic variables while solving problems of MATLAB Cody?

I recall that Cody disallows the use of essentially all toolboxes. Symbolic variables are only active for you, IF you have the s...

5 days ago | 0

Answered

Obtained results are far from the specified objective function when using fmincon with a Multi-Start.

No numerical optimization that applies to a completely general nonlinear function will converge to the global soution regardless...

Obtained results are far from the specified objective function when using fmincon with a Multi-Start.

No numerical optimization that applies to a completely general nonlinear function will converge to the global soution regardless...

5 days ago | 1

Answered

Please help me, how to plot for this function?

your function is complex. But a complex variable is really TWO variables, bundled into one. In ths case, it appears the imaginar...

Please help me, how to plot for this function?

your function is complex. But a complex variable is really TWO variables, bundled into one. In ths case, it appears the imaginar...

6 days ago | 1

Answered

Matrix multiplication accuracy problem

The Mathworks is NOT rounding numbers just to make your life difficult. They are not rounding numbers at all, at least not beyon...

Matrix multiplication accuracy problem

The Mathworks is NOT rounding numbers just to make your life difficult. They are not rounding numbers at all, at least not beyon...

6 days ago | 2

Answered

Trouble computing the factorial of a vector

No. Look CAREFULLY at that vector. Are they really zero? Or are they just relatively zero? F = factorial(1:50); F([1 2 48 49...

Trouble computing the factorial of a vector

No. Look CAREFULLY at that vector. Are they really zero? Or are they just relatively zero? F = factorial(1:50); F([1 2 48 49...

6 days ago | 1

Answered

Solve plane equation with 3 points and additional condition

This is actually pretty simple. I think you may be missing how simple it is. In three dimensions, 3 points determine a plane. T...

Solve plane equation with 3 points and additional condition

This is actually pretty simple. I think you may be missing how simple it is. In three dimensions, 3 points determine a plane. T...

6 days ago | 1

| accepted

Answered

Dealing with numbers bigger than Realmax

No. Not using double precision numbers. That does not say you can do nothing. You can use the symbolic toolbox to compute the ...

Dealing with numbers bigger than Realmax

No. Not using double precision numbers. That does not say you can do nothing. You can use the symbolic toolbox to compute the ...

7 days ago | 0

Answered

While loop with power.

This is the discrete logarithm problem. https://en.wikipedia.org/wiki/Discrete_logarithm#:~:text=Modular%20arithmetic.%20One%20...

While loop with power.

This is the discrete logarithm problem. https://en.wikipedia.org/wiki/Discrete_logarithm#:~:text=Modular%20arithmetic.%20One%20...

8 days ago | 1

| accepted

Answered

How to pseude-randomize dataset with constraints

So, you want it random, but you don't really want it random, in a sort of vague, unspecified way. Can you do this in MATLAB? NO...

How to pseude-randomize dataset with constraints

So, you want it random, but you don't really want it random, in a sort of vague, unspecified way. Can you do this in MATLAB? NO...

8 days ago | 0

Answered

How to calculate the volume of a segment of spherical cap intersected by a plane ?

I did suggest this scheme in my response to your question. And it seems pretty easy to do, so I am not sure where the problem li...

How to calculate the volume of a segment of spherical cap intersected by a plane ?

I did suggest this scheme in my response to your question. And it seems pretty easy to do, so I am not sure where the problem li...

9 days ago | 0

| accepted

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

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

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

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

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

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

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

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

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

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

16 days ago | 0