Prev: Spline problem
Next: regstats from lscov
From: Arun Kannath on 2 Jun 2010 09:55 Hi, I am trying to perform a non-linear curve fit using the CF tool box. Since my equation is non-linear and different from the default types, I need to choose "Custom Equation" as the Type of fit and press "New equation" button in the "Fitting" tab, seen on the Curve Fitting Tool window. I then use the "General Equations" tab to enter my non-linear eqaution. My equation is of the form y = c*int(f(x),-pi,pi) where f(x) is the funtion I want to integrate between limits -pi and pi. However, the curve fit tool does not seem to recognise "int" and does not consider it as a valid matlab expression. How can I get around this problem? I cant compute the integral analytically either. Interestingly, the toolbox seems to accept "diff" for differentiation. Please help. Thanks
From: Steven Lord on 2 Jun 2010 10:37 "Arun Kannath" <a.kannath(a)geotech.co.uk> wrote in message news:hu5nrq$c5e$1(a)fred.mathworks.com... > Hi, I am trying to perform a non-linear curve fit using the CF tool box. > Since my equation is non-linear and different from the default types, I > need to choose "Custom Equation" as the Type of fit and press "New > equation" button in the "Fitting" tab, seen on the Curve Fitting Tool > window. I then use the "General Equations" tab to enter my non-linear > eqaution. My equation is of the form y = c*int(f(x),-pi,pi) where f(x) > is the funtion I want to integrate between limits -pi and pi. However, the > curve fit tool does not seem to recognise "int" and does not consider it > as a valid matlab expression. > How can I get around this problem? I cant compute the integral > analytically either. Interestingly, the toolbox seems to accept "diff" for > differentiation. DIFF is defined for regular old numeric data. http://www.mathworks.com/access/helpdesk/help/techdoc/ref/diff.html INT is a method of symbolic objects from Symbolic Math Toolbox ONLY. http://www.mathworks.com/access/helpdesk/help/toolbox/symbolic/int.html [Well, okay, technically that's not true ... but the version of INT for char arrays simply turns the char array into a symbolic object and then calls the symbolic method.] I don't believe the CFTOOL or the other Curve Fitting Toolbox methods work on symbolic objects. -- Steve Lord slord(a)mathworks.com comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ To contact Technical Support use the Contact Us link on http://www.mathworks.com
|
Pages: 1 Prev: Spline problem Next: regstats from lscov |