[Scilab-users] Int3D / Triple integration
Stéphane Mottelet
stephane.mottelet at utc.fr
Fri Apr 2 14:02:56 CEST 2021
Le 02/04/2021 à 12:53, arctica1963 a écrit :
> Hi Stephane,
>
> At the moment I am just trying to understand how Scilab works with triple
> integration of f(x,y,z) with limits for xyz.
Ok, when you say "limits" for xyz you mean that each variable varies in
a given constant interval, that's what I meant by the rectangular
parallelepiped [x1,x2] x [y1,y2] x [z1,z2]. In fact it is a pity that
Scilab does not handle this case but only the more general case of a
collection of (eventually disconnected) tetrahedrons. However, cutting
your parallepiped in 5 (https://www.geogebra.org/m/C3TjXxFY) is enough
to use int3d, since they will be recursively divided to attain the
required precision:
deff('v=f(xyz,numfun)','v=xyz(1)^2+xyz(2)^2+xyz(3)^2')
xlim=[0 1];
ylim=[0 1];
zlim=[0 1];
[x,y,z]=ndgrid(xlim,ylim,zlim);
i = [5 8 2 3
5 8 2 6
5 8 3 7
5 2 3 1
2 3 8 4]';
[result,err] = int3d(x(i),y(i),z(i),f) --> result result = 1.0000000 --> err err =
1.110D-14
S.
> Lester
>
>
>
> --
> Sent from: https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users
--
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20210402/ad98c523/attachment.htm>
More information about the users
mailing list