From: M.J. Clark on
This is the error I get when I attempt to use quadl:

??? Attempted to access y(13); index out of bounds because
numel(y)=1.

Error in ==> quadl at 78
if ~isfinite(y(13))
From: M.J. Clark on
"M.J. Clark" <theonethatisgeeky(a)gmail.com> wrote in message <hepe3l$dlj$1(a)fred.mathworks.com>...
> This is the error I get when I attempt to use quadl:
>
> ??? Attempted to access y(13); index out of bounds because
> numel(y)=1.
>
> Error in ==> quadl at 78
> if ~isfinite(y(13))

This is the section of quadl it sends me to:
% Fudge endpoints to avoid infinities.
if ~isfinite(y(1))
y(1) = feval(f,a+eps(superiorfloat(a,b))*(b-a),varargin{:});
fcnt = fcnt+1;
end
if ~isfinite(y(13))
y(13) = feval(f,b-eps(superiorfloat(a,b))*(b-a),varargin{:});
fcnt = fcnt+1;
end
From: Steven Lord on

"M.J. Clark" <theonethatisgeeky(a)gmail.com> wrote in message
news:hepe3l$dlj$1(a)fred.mathworks.com...
> This is the error I get when I attempt to use quadl:
>
> ??? Attempted to access y(13); index out of bounds because
> numel(y)=1.

Commonly, that error indicates that the function you've written and passed
into QUADL does not meet the requirements listed in the documentation:

http://www.mathworks.com/access/helpdesk/help/techdoc/ref/quadl.html

"fun accepts a vector x and returns a vector y, the function fun evaluated
at each element of x."

If you call your function with a vector of values, does it return a vector
the same size and shape? If not, it needs to do so.

--
Steve Lord
slord(a)mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ


 | 
Pages: 1
Prev: lsqcurvefit error
Next: Problem with sostools