注册 登录
编程论坛 Matlab

matlab运行出错

liguo1989 发布于 2011-05-19 12:42, 798 次点击
function  unzipped_N=RLEdecode(zipped,info)
zipped=uint8(zipped);
[m,n]=size(zipped);
unzipped=[];
for i=1:m
    section=repmat(zipped(i,1),1,double(zipped(i,2)));
    unzipped=[unzipped section];
end
unzipped_N=reshape(unzipped,info.rows,info.cols);
unzipped_N=double(unzipped_N);



??? Error using ==> reshape
To RESHAPE the number of elements must not change.

Error in ==> C:\MATLAB6p5\work\RLEdecode.m
On line 9  ==> unzipped_N=reshape(unzipped,m,n);
0 回复
1