Non linear curve fitting by changing parameters

1 visualización (últimos 30 días)
Araz
Araz el 19 de Nov. de 2012
Hi
Im trying to fitt two non linear curves to each other the red curve to the blue . I have tried the basic fitting method but it doesn't give me a good match.
In the equation h=... of my code by changing some parameters which is 2.41, 0.389, 0.3, 0.406, 0.06, 0.406 i should get the red curve to be fitted on blue curve.
The equation h in my code is :
h=sqrt(1+(2.41./(1-(0.389e-6./lambda).^2))+(0.3./((1-(0.406e-6./lambda).^2)+((1i.*0.06).*(0.406e-6./lambda))))); I have changed much the parameters but the curves doesn't fit.
What can i do to fit this two curves to each other by changing only thus six parameters?
Best Regards
  1 comentario
Star Strider
Star Strider el 19 de Nov. de 2012
Editada: Star Strider el 19 de Nov. de 2012
The value of h is complex. Do you want to fit the real(h) and imag(h) components separately, or do you want to fit abs(h)?
I also see only five parameters: [2.41; 0.389E-006; 0.3; 0.406E-006; 0.06].
This post ‘fitting of two curves and 6 unknown parameters’ also seems to quote the same equation. How to R and w fit? Should they be in your equation also?

Iniciar sesión para comentar.

Respuestas (1)

Michael
Michael el 19 de Nov. de 2012
What is the blue curve? Usually a curve fitter algorithm requires a model (your h function) with specified parameter space (your six numbers), but also data to be fitted. Is the blue curve a set of (h,lambda) points?
In this format I'd suggest trying lsqcurvefit, you can specify your model h(lambda) in the argument, along with a starting point and your data.
  1 comentario
Araz
Araz el 19 de Nov. de 2012
blue curve is transmission vs lambda. The red curve in my code is also transmission vs lambda. but the curve differ from each other. is it possible to send the code to u email? u can have a look!

Iniciar sesión para comentar.

Categorías

Más información sobre Interpolation en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by