I have a 3D matrix (MxNxK) and want to resize it to (M\'xN\'xK\') (like imresize in matlab). I am using image pyramid, but its result is not very accurate and need a better
Look at the example Exploring Slices from a 3-Dimensional MRI Data Set in the Image Processing Toolbox. It looks more complicated than it actually is. You also can choose the interpolation method easily when working according to this example. To resize a volume isotrope by x, you'd have to use something like (I didn't test it):
T = maketform('affine',[x 0 0; 0 x 0; 0 0 x; 0 0 0;]);
R = makeresampler({'cubic','cubic','cubic'},'fill');
ImageScaled = tformarray(Image,T,R,[1 2 3],[1 2 3], round(size(Image)*x),[],0);
If you're working with binary images/volumes it might be better to change the 'cubic' interpolation to 'nearest'.