Cell computations - for loop
Show older comments
Hi, I have a variable RRI, which is a 1x48 cell, each cell being matrices of different sizes.
m = 0;
for num = 1:length(RRI{1,1})-1
if (RRI{1,1}(num+1)-RRI{1,1}(num) > 50*10^(-3)*360)
m = m+1;
end
end
The code above works perfectly fine for one of the cells and when I do the computations individually for each cell. How can I (in a for loop for instance) do this for all 48 cells (RRI{1,i}, i = 1:48) and store the results in the variable m, which should also be a 1x48 cell?
Thanks!
Accepted Answer
More Answers (1)
Uerm
on 17 Oct 2019
0 votes
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!