From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Quadrature method using vectors
Date: Thu, 28 Apr 2011 20:25:14 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 10
Message-ID: <ipcifa$t1v$>
References: <ipcfl1$90k$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1304022314 29759 (28 Apr 2011 20:25:14 GMT)
NNTP-Posting-Date: Thu, 28 Apr 2011 20:25:14 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: comp.soft-sys.matlab:724339

"Kyle" wrote in message <ipcfl1$90k$>...
> I was wondering if anyone knew of a method in MATLAB to numerically integrate a function using a quadrature method with a vector rather than a function as the input (step size/location defined by a second vector). The system of integrals I am attempting to integrate are coupled such that an explicit function cannot be passed to a quad(fun,a,b) type MATLAB function. I'd be happy to post the systems of integrals if you're interested.
> Writing the code for a vector based quadrature method shouldn't be too bad but it would be nice to save the time if I didn't have to do it.
> Any ideas?
- - - - - - - - -
  Matlab's function 'trapz' does numerical integration with specified variable step sizes using the trapezoidal rule.  Also FEX has other quadrature functions with variable step sizes written by other individuals (including myself) that use higher order approximations.

Roger Stafford