
From:  Nicholas Jankowski 
Subject:  Re: triple integral by octave 
Date:  Sun, 25 Oct 2015 21:05:45 0400 
On Oct 25, 2015 5:39 PM, "r c" <address@hidden> wrote:
>
> Hi,
>
> I would like to be able to integrate a triple integral using octave, I have started with a easy integral, the integral of f(x,y,z)=x*y*z, where 0<x<y<z,
> but i dont know how,
>
> function q = g(y)
> q = ones (size (y));
> for i = 1:length (y)
> f = @(x) x.*y(i);
> q(i) = quadgk (f, 0, y(i));
> endfor
>
> endfunction
>
> function p = h(z)
> p = ones (size (z));
> for i = 1:length (z)
> p(i) = quadgk ("g", 0, 1);
> endfor
>
> endfunction
> ctime (time ())
> quadgk("h",0,1)
> ctime (time ())
>
>
> Quadgk is a onefunction and I have to parameters....
>
> Thanks a lot
Most of the integration functions are designed for a single variable. If you need to perform a double or triple integration you should check out the following page of the manual:
https://www.gnu.org/software/octave/doc/interpreter/FunctionsofMultipleVariables.html
Nickj
[Prev in Thread]  Current Thread  [Next in Thread] 