Subscripted assignment dimension mismatch
이전 댓글 표시
N = 4;
tps=10;
status = [0 0 0 0 0 0 0 0 0 0 0];
img = zeros(540,960,N);
for i = 1:N
img_tmp = imread(f_list(i).name);
img(:,:,i) = img_tmp(:,:,1);
end
bck_img = (mean(img,3)); %average background template
%subplot(121);imagesc(bck_img)
%subplot(122);imagesc(img(:,:,1))
clear img;
pause(5)
%gaussian filter
hsize = 80;
sigma = 20;
gaus_filt = fspecial('gaussian',hsize , sigma);
%gaus_filt = fspecial('log',hsize , sigma);
%subplot(121); imagesc(gaus_filt)
%subplot(122); mesh(gaus_filt)
colormap(gray)
SE = strel('diamond', 0)
Here, I am getting the error as subscripted assignment dimension mismatch but I am unable to figure out where is the error.
댓글 수: 3
dpb
2018년 4월 14일
The error message will include the offending line in the text with traceback information to the calling routine.
Use the debugger and
dbstop on error
and you can see what condition of various variables is at the time of the failure which will more than likely lead you to the "aha!" moment...
Manisha Jaiswal
2018년 4월 15일
편집: per isakson
2018년 4월 15일
per isakson
2018년 4월 15일
- Full error message, please!
- See Debug a MATLAB Program
- See Examine Values While Debugging
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!