I am trying to use this file to fit an ellipse to an elliptical hysteresis loop from data points in a 2X200 array. I get the error "Attempted to access A(4); index out of bounds because numel(A)=0." I am not sure what the problem is- can you help?
Excellent implementation. Some people want to see the plot of the fit, you just have to add the following code in the end of the script.
%Convert the A to str
a = num2str(A(1));
b = num2str(A(2));
c = num2str(A(3));
d = num2str(A(4));
e = num2str(A(5));
f = num2str(A(6));
eqt= ['(',a, ')*x^2 + (',b,')*x*y + (',c,')*y^2 + (',d,')*x+ (',e,')*y + (',f,')'];
I tried using an XY array of
Using this set it provides exponential values for a,b and c return parameters and we cant use these parameters for a plot.
Is there something i am missing in this ? Can someone help?