reshape command debug/matrix exceeds dimensions

1 view (last 30 days)
psz=length(pic);
p=0
for i=1:outs:(psz) % dividing in blocks
for j=1:outs:(psz)
p=p+1;
blocks(:,:,p)=pic(i:i+outs-1,j:j+outs-1);
%ins(:,p)=reshape(blocks(:,:,p)',1,ins')';
end
end
error: Index exceeds matrix dimensions.
Error in train (line 28) blocks(:,:,p)=pic(i:i+outs-1,j:j+outs-1);
is the problem at the values that variable p is allowed to take?

Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!