Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Curve fitting errors
Replies: 1   Last Post: Dec 12, 2012 9:46 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Sarah

Posts: 1
Registered: 12/11/12
Curve fitting errors
Posted: Dec 11, 2012 4:12 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I am attempting to fit a large set of data and locate peaks using a Gaussian function. I am not familiar with Matlab, and have started writing code for it, but I get an error message.
"Undefined function 'minus' for input arguments of type 'dataset'"


load('hcldcl25th1.mat')
x=hcldcl25th1(:,1);
y=hcldcl25th1(:,2);
f(1)=2;
f(2)=4;
f(3)=2798;
fittype=(f(1)*exp(((x-f(3)).^2.*(-4*log(2)))./(f(2).^2)));

f(1), f(2), and f(3) are my initial guesses. What do I need to do, or what am I doing wrong?


Date Subject Author
12/11/12
Read Curve fitting errors
Sarah
12/12/12
Read Re: Curve fitting errors
Steven Lord

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.