Why does the following function produce error (Index in position 2 exceeds array bounds)?
조회 수: 1 (최근 30일)
이전 댓글 표시
Why does the following function produce error-
Index in position 2 exceeds array bounds.
Error in POD_DMD (line 47)
imagesc(reshape(Phi(1:r*c,mode),r,c));axis
image;set(gca,'Ydir','Normal')
close all
figure('name','POD')
subplot(figs,1,1)
imagesc(reshape(Phi(1:r*c,mode),r,c));axis image;set(gca,'Ydir','Normal')
title(['\Phi',sprintf('_%i (u-component)',mode)])
subplot(figs,1,2-d)
if com == 2
imagesc(reshape(Phi(r*c+1:end,mode),r,c));axis image;set(gca,'Ydir','Normal')
title(['\Phi',sprintf('_%i (v-component)',mode)]);
end
Please suggest possible solution.
Thanks!
댓글 수: 10
Walter Roberson
2021년 7월 12일
data(:,:,count) =
rgb2gray(imread(sprintf('%s/scene_%04d.bmp',directory,count))) ;
답변 (1개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!