MATLAB: Reshape

reshape

??? Error using ==> reshape To RESHAPE the number of elements must not change.
Error in ==> sym_rec_img_preprocess at 32 Ibox = reshape(Ibox,[4 ((sizer*sizec)/noimages)]);
Error in ==> sym_rec_main2 at 78 img = sym_rec_img_preprocess(I, sizer, sizec,noimages);
sizer = size3Dr; %32
sizec = size3Dc;
noimages = sizer/6;
I = I3Dtotal(:,:,i);
img = sym_rec_img_preprocess(I, size3Dr, size3Dc, noimages); % line 78
what am i doing wrong?

Best Answer

Go into sym_rec_img_preprocess and put these right before line 32:
size(Ibox)
size(sizer)
size(sizec)
noimages
Then tell us what the output to the command window says.