Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.



How to set coefficients of 'fittype' global?
Posted:
Jan 20, 2014 2:01 AM


Hello.. I am working on curve fitting. I have an equation to fit.
ft = fittype(@(Hs1,Hs2,s1,s2,m1,m2,x)(2*m1/pi)*atan(((x+Hs1)/Hs1).*tan((s1*pi)/2))+(2*m2/pi)*atan(((x+Hs2)/Hs2).*tan((s2*pi)/2)));
I have designed a GUI for fitting. This GUI contains six radio buttons, and six edit texts. When a particular radio button is ON, it shows that the value of it's corresponding Coefficient is fixed and the coefficient has become a constant. It means Now it is a constant. So when again executing fitting equation there will be five coefficients of unknown value and one constant.
For this purpose i want to pass the coefficients as global so that using other functions. How can I do this?



