|
"Aaron " <macraiga@gmail.com> wrote in message
news:h8tmp9$4ic$1@fred.mathworks.com...
> Hi All,
>
> I am looking to integrate the area under a surface fit. I searched for a
> method to do this and found a page on qyad2d
> http://www.mathworks.com/access/helpdesk/help/toolbox/curvefit/index.html?/access/helpdesk/help/toolbox/curvefit/quad2d.html
>
> which claimed the function quad2d will "Numerically integrate sfit object"
>
> However when I try to run it I get the error message
>
> "First input argument must be a function handle."
>
> Can anyone explain to me why this is happening, do I need a more recent
> version of Matlab?
The QUAD2D method for surface fit (sfit) objects was introduced in version
2.1 of Curve Fitting Toolbox, which was part of release R2009b.
http://www.mathworks.com/access/helpdesk/help/toolbox/curvefit/rn/br5i38t-1.html
If you're using an older version of the toolbox, MATLAB interprets that code
as a call to the QUAD2D _function_ which expects its first input to be a
function handle. As a workaround, write:
quad2d(@(x, y) mySFITobject(x, y), lowerXlimit, upperXlimit, lowerYlimit,
upperYlimit)
making the obvious substitutions.
If you are using this version of the toolbox, post how you're calling QUAD2D
on the sfit object.
--
Steve Lord
slord@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
|