Prev: vsim / Modelsim
Next: MPM in Matlab program
From: Adam Aitkenhead on 9 Dec 2009 08:54 Try changing the order of the inputs to interp3 from... > VI = interp3(X1,Y1,Z1,V,XI,YI,ZI); ....to... > VI = interp3(Y1,X1,Z1,V,XI,YI,ZI); This seems to work for the example you give, as well as for some other test cases I have tried (in Matlab R14). Unless I have misunderstood it (which is quite possible!), this problem seems to be a result of an error in the documention for interp3. Adam
From: Adam Aitkenhead on 9 Dec 2009 11:32
In fact the order of the XI,YI,ZI needs to be changed as well. If you change the line ... VI = interp3(X1,Y1,Z1,V,XI,YI,ZI); ... to ... VI = interp3(Y1,X1,Z1,V,YI,XI,ZI); .... then your code should work. Adam |