T O P I C R E V I E W |
grupy |
Posted - 05/30/2004 : 3:44:53 PM
Hi all,
I'm trying to do a fit for a pretty complex function which involves multiple peaks- hopefully this will give me a measurment of the wavelength I'm looking for. I've went into the fitting tool and created a new function. Basiclly I've managed to reduce it to: y=210.04*A*(lam/x)*(lam/x)*(sin(0.069*x/lam))*(sin(0.069*x/lam))*(cos(0.23*x/lam))*(cos(0.23*x/lam)) I've made sure type is "user defined" and the form is "Equations" (of course I've renamed the parametrs according to my needs...). Knowing more or less (from other experiments I did with the same setup) the size of A and lam, I went into Action->Fit, and entered the inital values accordingly: A->1.23, lam->0.028 . After one iteration I got A->14.99862, lam->0.9999 and annoying, nearly straight line. I've used wolfram mathmatica (using the same eqution as the one above) to plot the graph and it comes out just the way I'de like it to be. How come I get the straight line???
Grupy. |
2 L A T E S T R E P L I E S (Newest First) |
grupy |
Posted - 06/03/2004 : 2:50:11 PM Many Thanks Easwar!
Though the fit didn't come out as nice as I expected, the values I got were good enough!
Cheers and beers, Grupy. |
easwar |
Posted - 05/31/2004 : 09:47:27 AM Hi Grupy,
If you want to put in some initial values for your parameters and just see how the curve will look like, just click the Chi-Sq button instead of the Iter buttons.
When you click the Iter buttons, (multiple) iterations are performed where the Levenberg-Marquardt routine tries to minimize the chi-sq, leading to the best fit for your data. If the resulting parameter values are "going out of bounds", what you can do is to use the Control dialog of the NLSF tool to set upper and lower bounds on your parameters so that the minimization process stays within what you deem to be reasonable values.
Easwar OriginLab
|
|
|