hexagon logo

Alternative to INTERP2 for interpolating 3D spline in design-time ?

Hi,
 
I am trying to interpolate the following 3D spline with INTERP2 function but it gives error "x and y array size must be equal".
 
xs = 1,2,3,4,5
ys = 1,2,3,4,5,6,7,8,9,10
zs = 1,2
 
My objective is to get the Y data in output for different X and Z input.
 
if INTERP2 will not work in this case then is there any other design-time option to interpolate this type of 3D data ?
 
Thank you very much in advance !
Parents
  • You can access spline x/y/z values via
    .model.spline_name.xs/ys/zs
     
    The error indicates the fact that for example xs and ys do not have the same length.
    You need to work with stuff like
     
    .model.spline_name.xs -> Has 5 elements
    .model.spline_name.ys[1:5] -> Is returning the first set of 5 elements of the y column
    .model.spline_name.ys[6:10] -> Is returning the second set of 5 elements of the y column
Reply
  • You can access spline x/y/z values via
    .model.spline_name.xs/ys/zs
     
    The error indicates the fact that for example xs and ys do not have the same length.
    You need to work with stuff like
     
    .model.spline_name.xs -> Has 5 elements
    .model.spline_name.ys[1:5] -> Is returning the first set of 5 elements of the y column
    .model.spline_name.ys[6:10] -> Is returning the second set of 5 elements of the y column
Children
No Data