Answered
gernerating standard normal variable in matlab
I'm a little confused. Why would you expect the result (of z*z') would be even remotely close to an identity matrix? In fact, yo...

3 years ago | 0

Answered
Set Element Index to 1
Your real problem is you misunderstand what you are doing, in wanting to write a Newton-Raphson code! If I had to guess, your co...

3 years ago | 0

Answered
Random numbers generation based on specific distribution function, then sort in specific way
Where is the problem? You don't say what the distribution of those numbers is, so absolutely nothing can be done until you deci...

3 years ago | 0

Answered
constrain the csapi fitting to positive values
I'm sorry, biut you cannot constrain an interpolating spline built by csapi to be everywhere positive. The mathematics of how th...

3 years ago | 0

| accepted

Answered
Formulating a part of a given circle
Drawing circular arcs here seems a bit unnecessary, since there is no need for it. You seem to be just looking for the basic sha...

3 years ago | 1

Answered
What is the difference in inpaintn and inpaint_nans functions?
inpaint_nans is my code, so I know where it is, on the file exchange. Looking there, I see also a code named inpaintn. If you w...

3 years ago | 1

| accepted

Answered
My Matlab command windows displays poorly organized rows and columns whenever I display a big array, how to I fix this?
You need to set the desktop text font to be a monospaced font. Go to: Settings/Fonts I tend to use something simple like M...

3 years ago | 1

Answered
Does the randi function have a good level of pseudorandomness?
randi is random. At least as good as is mathematically possible to make it so, based on the random number generation tools we ha...

3 years ago | 1

Answered
Integral of user-defined function
Is your code vectorized? That is, what happens when a VECTOR of elements for y is passed in? (It does not appear to be.) integ...

3 years ago | 0

Answered
I want to find second and third maxima in a row of a matrix of size 1000*8
BREAK DOWN PROBLEMS THAT ARE TOO LARGE FOR YOU TO HANDLE INTO SMALLER, BITE SIZED CHUNKS. First, if it is a particular row, the...

3 years ago | 0

Answered
How to get area between 2 cdf curves?
If the curves cross, then you need to decide what the "area between" means. That is, is the area in one part negative? Or do you...

3 years ago | 0

| accepted

Answered
transposing 3d matrix with permute function
You CANNOT tell MATLAB that a matrix is explicitly 265x508x1, and have it recognize that third singleton dimension. Yes, if you ...

3 years ago | 0

Answered
How to calculate are under the curve from 2 vector sets.
It seems as if you want to compute the area between the curve and the x axis, while ignoring the sign of y. But a simple integra...

3 years ago | 1

| accepted

Answered
lsqnonlin optimization: large condition number of Jacobian matrix at all iterations, but full rank
@SA-W - A full rank does NOT mean the parameters are not linearly dependent. With that high of a condition number, it often does...

3 years ago | 0

Answered
lsqcurvefit() moved from Matlab to toolbox?
You definitely mis-remember this. lsqcurvefit has always been in the optimization toolbox. At least as long as I can recall on t...

3 years ago | 0

Answered
Hi there, I am trying to solve a differentiation of long equation. The system shoot me the warning that cannot find a explicit solution. I need the value of X in terms C.
I want world peace. Does that mean I can have it? I even need world peace. Still, no good. How about you? You need to solve an e...

3 years ago | 0

| accepted

Answered
how to write a specific text in matlab
L appears there as a function ONLY as the inverse of L. As such, it is just a name. We could call it something else, and nothing...

3 years ago | 0

Answered
How to generate bivariate random normally distributed 3d array?
Um, trivial? You apparently want to generate 300 samples of a bivariate normal. So generate them as a 300x2 array, Then reshape...

3 years ago | 1

| accepted

Answered
Why the nonlinear least square fitted curve is not a curve?
Data=[0.928571429, 0; 0.012118074, 1.5; -0.450001188, 3; -0.316739249, 4.5; 0.394139277, 6; 0.094786629...

3 years ago | 1

Answered
vpa solving 5 equations with 5 unknowns, but result is an empty structure
Suppose I had two equations. Two unknowns. Totally trivial, but they are not unlike your question. x + y = 1 x - y <= 3 ...

3 years ago | 0

Answered
Second time derivative of ODE45 solution looks bumpy
Reemmber that the gradient function usues an APPROXIMATION. And, that at the ends of the series, that approximation is less good...

3 years ago | 0

Answered
How to plot a surface curve with inequalities?
And exactly what is the problem? I think what you do not understand is, what you have created is NOT a surface. M = 0.85 : 1/20...

3 years ago | 0

Answered
Fsolve produces comlex numbers
Remember that fsolve does not allow constraints. Not even bound constraints. So when one of the variables tries to go into a bad...

3 years ago | 0

Answered
Optimisation Algorithm and Levenberg-Marquardt for fitglm in MATLAB
The important thing you need to recognize is that fitglm fits a LINEAR model. No nonlinear iterations will be performed. fitgl...

3 years ago | 0

Answered
error in the process of symbol operation of the matrix
Why do you think there is something wrong with T? We don't know why you wrote this code. It computes what you told MATLAB to com...

3 years ago | 0

Answered
Is it possible to plot a curve with changing colours under a single plot?
Arguably, this is something the line function would allow you to do. But line allows you to specify only a single color for an e...

3 years ago | 0

| accepted

Answered
Find value at which a line changes its slope
There is NO exact point where that can be known to happen. Your curve is noisy. At best, you can estimate where the curve start...

3 years ago | 0

Answered
How do I get random variables generated from a distribution in [-1, 1]?
The MATLAB crystal ball is foggy today. You give us a tiny fragment of code, and then tell us that something strange happens. PR...

3 years ago | 1

Answered
Can Simulink use symbolic constants (syms x, y, z) or only numerical values (x=1, y=2, z=3) are accepted ?
NO. Simulink will NOT use symbolic parameters. Sorry. Simulink is essentially a numerical solver. It does not perform symbolic c...

3 years ago | 0

| accepted

Answered
three order complex coefficient polynomial root matlab
Another classic solution is to find the matrix that has the same eigenvalues as your polynomial has roots. Then use eig to compu...

3 years ago | 1

Load more