clarification in for loop with intervals
8 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Turbulence Analysis
el 20 de En. de 2021
Comentada: Turbulence Analysis
el 20 de En. de 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 comentarios
Respuesta aceptada
per isakson
el 20 de En. de 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
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!