ill-conditioned of The Jacobian

5 views (last 30 days)
Caroline Pilet
Caroline Pilet on 15 Apr 2021
Commented: Jan on 15 Apr 2021
Hi,
First of all, i'm sorry for my english if some of my sentences wont be clear, I'm a french student.
I'm working on a exercice which ask me to use the command "nlinfit". I did all the exercice, but when i run it, i have this message which appears : "Warning: The Jacobian at the solution is ill-conditioned, and some model parameters may not
be estimated well (they are not identifiable). Use caution in making predictions. ".
I already saw that this question has already been asked, but i cant solve it with my code. I dont see where the problem is. Can someone help me ?
I dont know if i can show my code, but here it is :
I would be very grateful if someone can help me to find where the problem is.
load('data.mat');
n=nlinfit(x,y,@parabole,[-10.^(-5);-1;10.^4]);
n1=n(1);
n2=n(1);
n3=n(3);
p=n1.*x.^2+n2.*x+n3;
e=[((-n2-sqrt(n2^2-4*n1*n3))/2*n1);((-n2+sqrt(n2^2-4*n1*n3))/2*n1)];
x1=e(1);
x2=e(2);
hold on
if x1>0 %Si x1 positif
plot(x1,0,'o');
end
if x2>0 %Si x2 positif
plot(x2,0,'o');
end
plot(x,y,'m');
plot(x,p,'g');
hold off
function[p]=parabole(a,x)
a1=a(1);
a2=a(2);
a3=a(3);
p=a1+a2.*x+a3.*x.^2;
end
Thank you very much
  1 Comment
Jan
Jan on 15 Apr 2021
What is the contents of the file data.mat?
By the way, -10.^(-5) is an expensove power operation, while -1e-5 is a cheap constant.

Sign in to comment.

Answers (0)

Categories

Find more on CubeSat and Satellites in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!