Error: Index exceeds matrix dimensions.
    4 views (last 30 days)
  
       Show older comments
    
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 Comments
Answers (1)
  Azzi Abdelmalek
      
      
 on 24 Feb 2013
        
      Edited: Azzi Abdelmalek
      
      
 on 24 Feb 2013
  
      What you should do is
for k = 1 : size(a,4)
  source(k).cdata = a(:,:,:,k);
  source(k).colormap = [];
end
8 Comments
See Also
Categories
				Find more on Matrix Indexing in Help Center and File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


