format compact
L = cat(3,[1,3,5;7,9,11;13,15,17],[3,5,7;9,11,13;15,17,19])
Xi = 1:3;
Yi = [1,3,5];
Zi = [1,3];
[Xq,Yq,Zq] = ndgrid(1:3,1:5,1:3);
A = interpn(Xi,Yi,Zi,L,Xq,Yq,Zq)
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!