[Scilab-users] 3D interpolation

Samuel Gougeon sgougeon at free.fr
Fri Mar 24 21:40:50 CET 2017


Le 24/03/2017 à 18:40, paul.carrico at free.fr a écrit :
> Hi all,
>
> I don't know if my question is relavante (or not), but I'm wondering 
> what is the best way to perform a 3D interpolation, from for the 
> matrix definition to the interpolation procedure.
>
> Let me using a basic example: I've some curves y = f(x,T) defining a 
> material behaviour at different temperatures i.e. 1 curve (x,y) per 
> temperature:
> - y = f(x,20)
> - y = f(x,100)
> - y = f(x,200)
>
> etc.
>
> What is the best way to define a single matrix? [x y T] ?

It depends on whether f() is vectorized or not. It could be something like
t = [20 100 200];
[X, T] = ndgrid(x, t);
Y = f(X,T);
// or
Y = feval(x, t);

Then:
M = [X(:) Y(:) T(:)];


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20170324/250f24e3/attachment.htm>


More information about the users mailing list