Z = interpn(A,1:S(1),1:S(2),linspace(1,S(3),2*S(3)))
Z(:,:,1) =
3.0 3.0 5.0 3.0 8.0 1.0 2.0
8.0 7.0 3.0 4.0 9.0 9.0 2.0
3.0 5.0 7.0 8.0 6.0 4.0 9.0
2.0 9.0 1.0 7.0 3.0 6.0 6.0
2.0 5.0 8.0 9.0 7.0 9.0 2.0
Z(:,:,2) =
3.0 4.2 6.6 3.8 6.0 2.6 2.8
7.2 7.4 2.2 4.8 9.0 7.4 4.4
5.0 5.0 6.2 8.4 5.2 3.2 9.0
4.0 7.8 2.6 5.0 4.6 6.0 5.2
4.4 4.6 5.6 7.8 4.6 7.8 2.8
Z(:,:,3) =
3.0 5.4 8.2 4.6 4.0 4.2 3.6
6.4 7.8 1.4 5.6 9.0 5.8 6.8
7.0 5.0 5.4 8.8 4.4 2.4 9.0
6.0 6.6 4.2 3.0 6.2 6.0 4.4
6.8 4.2 3.2 6.6 2.2 6.6 3.6
Z(:,:,4) =
3.4 5.2 7.4 5.8 4.2 5.6 3.4
6.6 8.0 1.8 5.8 8.8 5.6 6.8
8.2 5.2 4.4 7.4 4.8 3.4 8.0
6.6 5.0 4.8 3.4 7.0 5.6 3.6
6.6 3.4 2.4 6.4 2.6 6.4 4.8
Z(:,:,5) =
4.2 3.6 4.2 7.4 6.6 6.8 2.2
7.8 8.0 3.4 5.4 8.4 6.8 4.4
8.6 5.6 3.2 4.2 6.4 6.2 6.0
5.8 3.0 4.4 6.2 7.0 4.8 2.8
3.8 2.2 3.2 7.2 5.8 7.2 6.4
Z(:,:,6) =
5.0 2.0 1.0 9.0 9.0 8.0 1.0
9.0 8.0 5.0 5.0 8.0 8.0 2.0
9.0 6.0 2.0 1.0 8.0 9.0 4.0
5.0 1.0 4.0 9.0 7.0 4.0 2.0
1.0 1.0 4.0 8.0 9.0 8.0 8.0
Best Answer