I am do research in plasma physics and am using MATLAB to plot the data I collect for a double langmuir probe. I would like to fit this plotted data to a tanh function since that is what the theory says it should follow. I haven't been able to find anything too helpful so far.
Thanks,
Darren
If you have Statistics Toolbox, try nlinfit.
http://www.mathworks.com/help/toolbox/stats/bq_676m-43.html
If you have Optimization Toolbox, try lsqcurvefit.
http://www.mathworks.com/help/toolbox/optim/ug/brn4noo.html#brp3l6v-1
Alan Weiss
MATLAB mathematical toolbox documentation
help lsqcurvefit
Best wishes
Torsten.
current*tanh(xdata/(2*temperature)
where xdata is the xdata of the data that I am fitting to. What would I input in my code to do this?
Thanks!
Torsten <Torsten...@umsicht.fraunhofer.de> wrote in message <976d409f-e832-4748...@x3g2000yqj.googlegroups.com>...
"Darren Weinhold" wrote in message <iv29ap$pb7$1...@newscl01ah.mathworks.com>...
Alan Weiss
MATLAB mathematical toolbox documentation
What exactly is the resnorm? I would like the R-squared value, is this related to it?
Thanks again,
Darren
Alan Weiss <awe...@mathworks.com> wrote in message <iv2ceq$5hq$1...@newscl01ah.mathworks.com>...
If I understand correctly, R-squared is a measure of the linear errors,
I am not sure how it applies to a nonlinear fitting problem. However, if
you use the nlinfit function from Statistics Toolbox instead of
lsqcurvefit, you can get an estimated covariance matrix for the fitted
parameters, which might satisfy your desire for an accuracy measurement.
Alan Weiss
MATLAB mathematical toolbox documentation
Alan Weiss <awe...@mathworks.com> wrote in message <iv46mu$19h$1...@newscl01ah.mathworks.com>...
"Darren Weinhold" wrote in message <iui09m$ofb$1...@newscl01ah.mathworks.com>...
Hi Alan,
Isn't it frustrating to be hornswaggled into top-posting
by an OP who doesn't know better?
I have gotten into the habit of using R-squared and
degree-of-freedom adjusted R-squared as performance
measures for nonlinear neural networks.
What is the perceived danger in doing so?
Greg
This CSSM thread throws some light on the subject:
http://groups.google.com/group/comp.soft-sys.matlab/browse_thread/thread/8150ccce42b56c5a
Greg