reshape matlab To RESHAPE the number of elements must not change.tupian='F:\matlab\tupian\green.bmp'Message_a=double(imread(tupian));Mm=size(Message_a,1);Nm=size(Message_a,2);n=Mm*Nm;Message=round(reshape(Message_a,1,n)./256);运行后Error using ==>

来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/13 03:54:26
reshapematlabToRESHAPEthenumberofelementsmustnotchange.tupian=''F:\matlab\tupian\green.bmp''Message_a=

reshape matlab To RESHAPE the number of elements must not change.tupian='F:\matlab\tupian\green.bmp'Message_a=double(imread(tupian));Mm=size(Message_a,1);Nm=size(Message_a,2);n=Mm*Nm;Message=round(reshape(Message_a,1,n)./256);运行后Error using ==>
reshape matlab To RESHAPE the number of elements must not change.
tupian='F:\matlab\tupian\green.bmp'
Message_a=double(imread(tupian));
Mm=size(Message_a,1);
Nm=size(Message_a,2);
n=Mm*Nm;
Message=round(reshape(Message_a,1,n)./256);
运行后
Error using ==> reshape
To RESHAPE the number of elements must not change.
哪错了?

reshape matlab To RESHAPE the number of elements must not change.tupian='F:\matlab\tupian\green.bmp'Message_a=double(imread(tupian));Mm=size(Message_a,1);Nm=size(Message_a,2);n=Mm*Nm;Message=round(reshape(Message_a,1,n)./256);运行后Error using ==>
使用imread读取到的图片的数据是一个三维的矩阵.你把它当做二维来处理是错误的!所以出错了!