필터 지우기
필터 지우기

Error: Index exceeds matrix dimensions.

조회 수: 1 (최근 30일)
pratibha rane
pratibha rane 2013년 2월 24일
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

답변 (1개)

Azzi Abdelmalek
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
pratibha rane
pratibha rane 2013년 2월 25일
this problem solved after installation of window 7 codec net pack.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by