[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Question about vector function integration
From: |
Corsair |
Subject: |
Re: Question about vector function integration |
Date: |
Thu, 13 Nov 2008 10:13:58 +0800 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
On Wed, Nov 12, 2008 at 10:16:46PM +0100, Ivan Sutoris wrote:
> On Wed, Nov 12, 2008 at 2:05 PM, Corsair <address@hidden> wrote:
> > Hi all. Anyone know how to use `quad' to integrate a vector function?
>
> Hi
>
> apparently, quad doesn't support vector-valued functions, so you
> should evaluate your integral for each element of dB separately:
>
> intfun1 = @(t) dB(t)(1);
> intfun2 = @(t) dB(t)(2);
> intfun3 = @(t) dB(t)(3);
> [v, ier, nfun, err] = quad(intfun1, 0, 12)
> [v, ier, nfun, err] = quad(intfun2, 0, 12)
> [v, ier, nfun, err] = quad(intfun3, 0, 12)
Thanks for your reply! It works :-D I did not think it this way...
--
There is no emotion; there is peace.
There is no ignorance; there is knowledge.
There is no passion; there is serenity.
There is no death; there is the Force.
pgpNHqC3VszyB.pgp
Description: PGP signature