MATLAB: Nonlinear curve fitting, how to

curve fittingMATLABmulti variablenlfitoptimization

Hi,
I have two nonlinear functions defining the response of a system in frequency domain
H(f;Y0,Z0)= Z / ((j*2*pi*f)+(j*2*pi*f*Y0)+Z0)
H(f;Y1,Z1)= Z / ((j*2*pi*f)+(j*2*pi*f*Y1)+Z1)
to see the difference in two responses in decibles I introduce S(f) as
S(f) = 20*log(H(f;Y1,Z1)/H(f;Y0, Z0))
I also have predetermined values for S(f) obtained from experimental work where in both cases f is a known vector.
My main aim is to find values for Y1, Z1, Y0, Z0 through optimization in order to fit
S(f) = 20*log(H(f;Y1,Z1)/H(f;Y0, Z0))
to my experimental readings
How can I best achieve this ?

Best Answer

If you have the Statistics Toolbox, you should be able to do this with the nlinfit() function.
Related Question