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
  • Thank you very much @Martin Kieltsch​ ​ for looking into this !
    Actually I wrote the above mentioned spline to give an idea of how my data look like. Sorry for confusion.
     
    If I try as given in the help documents "INTERP2 (x, y, z, Xi, Yi method)"
     
    Working Fine :-> (INTERP2({1,2,3},{1,2,3},{1,2,3,4,5,6,7,8,9},{1},{1},"spline"))
    But giving error :-> (INTERP2({1,2,3},{1,2},{1,2,3,4,5,6},{1},{1},"spline"))
     
    So, for me its looks like, this function is not working well with asymmetrical matrix or I may need help to re-arrange it.
Reply
  • Thank you very much @Martin Kieltsch​ ​ for looking into this !
    Actually I wrote the above mentioned spline to give an idea of how my data look like. Sorry for confusion.
     
    If I try as given in the help documents "INTERP2 (x, y, z, Xi, Yi method)"
     
    Working Fine :-> (INTERP2({1,2,3},{1,2,3},{1,2,3,4,5,6,7,8,9},{1},{1},"spline"))
    But giving error :-> (INTERP2({1,2,3},{1,2},{1,2,3,4,5,6},{1},{1},"spline"))
     
    So, for me its looks like, this function is not working well with asymmetrical matrix or I may need help to re-arrange it.
Children
No Data