Filter löschen
Filter löschen

Error: Index exceeds matrix dimensions.

1 Ansicht (letzte 30 Tage)
pratibha rane
pratibha rane am 24 Feb. 2013
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

Antworten (1)

Azzi Abdelmalek
Azzi Abdelmalek am 24 Feb. 2013
Bearbeitet: Azzi Abdelmalek am 24 Feb. 2013
What you should do is
for k = 1 : size(a,4)
source(k).cdata = a(:,:,:,k);
source(k).colormap = [];
end
  8 Kommentare
pratibha rane
pratibha rane am 25 Feb. 2013
this problem solved after installation of window 7 codec net pack.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by