Error: Index exceeds matrix dimensions.

1 vue (au cours des 30 derniers jours)
pratibha rane
pratibha rane le 24 Fév 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

Réponses (1)

Azzi Abdelmalek
Azzi Abdelmalek le 24 Fév 2013
Modifié(e) : Azzi Abdelmalek le 24 Fév 2013
What you should do is
for k = 1 : size(a,4)
source(k).cdata = a(:,:,:,k);
source(k).colormap = [];
end
  8 commentaires
pratibha rane
pratibha rane le 25 Fév 2013
this problem solved after installation of window 7 codec net pack.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Startup and Shutdown dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by