clarification in for loop with intervals
11 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
per isakson
2021-1-20
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
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!