nonlinear curve fitting
- To: mathgroup at smc.vnet.net
- Subject: [mg51942] nonlinear curve fitting
- From: db at ict.fhg.de (julia)
- Date: Fri, 5 Nov 2004 02:18:29 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
Hello, i want to use Mathematica for the interpretation of some input-rsponse measurements. I'm a real newbie and i'm not sure how to do it and whether it is possible. After some first trials, there are some problems and i hope somebody can help me. I'm measuring an time-dependent input- and an output-signal. The input has to be convoluted with a model and this convoluted product fitted to the measured response-curve. I've tried the build-in NonLinearFit-tool, but it didn't work well. I think i can't use it because i have some more steps (convolution, normalization...) to do except of just fitting a dataset to a model. It would be necessary to combine all this steps to "model" in "NonlinearFit[data, model, variables, parameters]". I'm not sure, if this would work.... Therefore i think i have too write an algorithm for the fit instead of using the build-in. I've mentioned before that i don't have much experience in programming and therefore i searched for some codes in the web. I've taken the algorithm for a gaussian fit written by Eric W. Weistein (which can be found here: http://mathworld.wolfram.com/NonlinearLeastSquaresFitting.html) and I've modified it, in order to use my models. Now I have two problems: 1. I get complex values for my model-parameters. That's cumbersome but not really bad, because the imaginary parts are small and can be chopped. 2. I get a negative value (even with a very good initial assumption) for one parameter, which is physically nonsense. Does anybody know how to bar mathematica from doing this? I hope somebody can help me with this! Is it the right way to code it by myself or should i better use the build-in function? Writing it by myself would be very difficult and time-consuming. Therefore I'm wondering why there are not more different algorithms (e.g. Rosenbrock or other optimization algorithms) written in mathematica-code found on the web. Does anybody know a source? Thanks in advance julia