Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to solve index exceeds matrix dimensions - MATLAB

Status
Not open for further replies.

sadhna

Newbie level 5
Joined
May 31, 2012
Messages
8
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,312
data = getdata(vid,50,'double','cell');
for i=1:5:100
data{i}:),:,1)=(data{i}:),:,1))+(data{i+1}:),:,1))+(data{i+2}:),:,1))+ ...
(data{i+3}:),:,1))+(data{i+4}:),:,1))/5;
data{i}:),:,3)=(data{i}:),:,3))+(data{i+1}:),:,3))+(data{i+2}:),:,3))+...
(data{i+3}:),:,3))+(data{i+4}:),:,3))/5;
data{i}:),:,2)=(data{i}:),:,2))+(data{i+1}:),:,2))+(data{i+2}:),:,2))+...
(data{i+3}:),:,2))+(data{i+4}:),:,2))/5;
end
 

The variable 'data' will now contain a cell array with details of only 50 frames...
But, inside the 'for' loop, you are trying to access till 100, which results in the error
'index exceeds matrix dimensions'...
Inside the 'for' loop i varies as shown:- 1 6 11 16 21 26 31 36 41 46 51 56 61 66 71 76 81 86 91 96

data = getdata(vid,100,'double','cell'); or for i=1:5:50
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top