- Assume a Matrix A which is (M X N X P) array.
I want to upsample one dimension of the matrix, for example: upsample the third dimension by factor of 2.
Currently I'm using loops to make it happen:
B = zeros(M, N, 2 * P);
for ii = 1 : M
for jj = 1 : N
B(ii, jj, 🙂 = interp(double(A(ii, jj, :)), 2);
end
end
Is there any way to do so which doesn't include any use of loops?
Best Answer