Poly11: "Warning: Equation is badly conditioned. Remove repeated data points or try centering and scaling."
49 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Zachary Ferrie
el 21 de Feb. de 2019
Comentada: Zachary Ferrie
el 25 de Feb. de 2019
Hi All,
I have the below code running on MATLAB which produces the warning message (also shown below). I am trying to figure out what why the warning message is appering.
My guess is that since the values i use for my fit are similar I get the message but I want to be sure that nothing is going wrong.
I am trying to fully understand things.
Thanks
%INPUT
xy = [3154384.896 1719923.63; 3155030.31 1719242.07; 3155498.37 1719245.31];
z =
1.0e+03 *
5.121466000000001
5.126727000000000
5.126100000000000
R = fit(xy, z, 'poly11') % 'polly11' fit = fit linear polynomial surface. For more info visit: https://www.mathworks.com/help/curvefit/fit.html
coeffs = coeffvalues(R)
Slopex = coeffs(2) %extract slope x
Slopey = coeffs(3) %extract slope y
%OUTPUT
Warning: Equation is badly conditioned. Remove repeated data points or try centering and scaling.
> In curvefit.attention.Warning/throw (line 30)
In fit>iLinearFit (line 672)
In fit>iFit (line 383)
In fit (line 108)
Linear model Poly11:
R(x,y) = p00 + p10*x + p01*y
Coefficients:
p00 = 2.451e+04
p10 = -0.001278
p01 = -0.008929
coeffs =
1.0e+04 *
2.450931465568791 -0.000000127776324 -0.000000892905436
0 comentarios
Respuesta aceptada
Walter Roberson
el 21 de Feb. de 2019
The problem is not in the z: the problem is in the y values being very similar.
Your fit can be rewritten as
p = [ones(3,1), xy] \ z
and for that the sensitivity can be estimated by cond([ones(3,1),xy]) which comes out about 1E11 .
Más respuestas (0)
Ver también
Categorías
Más información sobre Fit Postprocessing en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!