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

回答(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 中查找有关 Startup and Shutdown 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by