clarification in for loop with intervals
7 views (last 30 days)
Show older comments
Turbulence Analysis
on 20 Jan 2021
Commented: Turbulence Analysis
on 20 Jan 2021
Hi,
I am running the for loop with the intervals as shown below, here at the end of each sequence I need to save the average image for e.g.55 to 65, then that particular matrix needs to be cleared then continue with next seqeunce i.e. 125:1:145 and so on.. Is there a way to do this ???
for kk = [55:1:65 125:1:145 201:1:225]
% my code
end
2 Comments
Accepted Answer
per isakson
on 20 Jan 2021
Someting like this
%%
indicies = {[55:1:65], [125:1:145], [201:1:225]};
for jj = 1 : numel( indicies )
for kk = indicies{jj}
% my code
end
% save average
end
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!