Error: Index exceeds matrix dimensions.
조회 수: 1 (최근 30일)
이전 댓글 표시
obj=mmreader('ATMvid.avi');
a=read(obj, [10 200]);
%a=read(obj);
frames=get(obj,'numberOfFrames');% to find no.of frames
frames
for k = 1 : frames-1
source(k).cdata = a(:,:,:,k);
source(k).colormap = [];
end
In above code I am getting error "Index exceeds matrix dimensions.", please help
댓글 수: 0
답변 (1개)
Azzi Abdelmalek
2013년 2월 24일
편집: Azzi Abdelmalek
2013년 2월 24일
What you should do is
for k = 1 : size(a,4)
source(k).cdata = a(:,:,:,k);
source(k).colormap = [];
end
댓글 수: 8
참고 항목
카테고리
Help Center 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!