Use of casadi.interpolant in Matlab #3728
-
Hi all, I am trying to use the casadi interpolant class, but when I perform a simple example I get a weird result. Here is my code in Matlab: X = (0:1:100)'; [Xm,Ym] = meshgrid(X,Y); Zm = Xm+Ym.^2; lutZ = casadi.interpolant('lutZ','bspline',{X,Y}, Zm(:)); res = full(lutZ([x,y])); % = 2550 Can someone tell me why res is not equal to res2? Thanks a lot! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Ok, I found the solution. That was easy. Sorry for that :) |
Beta Was this translation helpful? Give feedback.
Ok, I found the solution. That was easy.
Zm must be transposed.
Sorry for that :)