[Scilab-users] 3D interpolation : comments adding

paul.carrico at free.fr paul.carrico at free.fr
Sat Mar 25 19:38:48 CET 2017


Hi Tim 

That's indeed what I've read as well; my need remains to get a linear
interpolation between physical points ... I'm still digging in order to
find a "pleasant" code :_) 

Thanks for the feedback 

Paul 

Le 2017-03-25 17:52, tim at wescottdesign.com a écrit : 

> The help says that splin2d generates bicubic patches, so presumably
> it's not linear interpolation. 
> 
> On 2017-03-25 00:24, paul.carrico at free.fr wrote:
> 
>> Hi All
>> 
>> To go further in 2D/3D interpolation as I started in my previous
>> emails, I built the example here after.
>> 
>> As suggested, I had a look to
>> - cshep2d but but seems can not be used here (dimensions issue)
>> - splin2d + interp2d
>> 
>> In the later case, Am I right to say that splin2d "cross-sections"
>> the surface in order to define the "best spline" passing through the
>> nodes (in the cross section obviously), then the
>> interpolation/calculation is basically using this new 2D function,
>> right ?
>> 
>> if so this is not a linear interpolation between 2 nodes (as I
>> expect), isn't it?
>> 
>> Paul
>> 
>> ############################################
>> 
>> mode(0)
>> 
>> n=10;
>> x = linspace(0,300,(n+1))';    // abscissa
>> t = [0 25 100];                         // temperature
>> z = 20*rand((n+1),3);            // ordinate
>> // Nota : we must have the same number of data for both x and z
>> 
>> //  plot3d
>> clf()
>> a=get("current_axes");
>> a.x_label; x_label=a.x_label; x_label.text=" X abscissa";
>> a.y_label; y_label=a.y_label; y_label.text=" Temperature T";
>> a.z_label; z_label=a.z_label; z_label.text=" y ordinate";
>> plot3d(x,t,z)
>> 
>> // Nota: if I do a cross section normal to XoZ plane, I've the basic
>> curve z=f(x,T)) -> seems correct
>> 
>> //  interpolation
>> xp = [22 103 236]'
>> tp = [5 56 85]'
>> 
>> [Xp,Tp] = ndgrid(xp,tp)
>> 
>> _______________________________________________
>> users mailing list
>> users at lists.scilab.org
>> http://lists.scilab.org/mailman/listinfo/users
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20170325/a5fc7591/attachment.htm>


More information about the users mailing list