Cycle For how can i??
Mostrar comentarios más antiguos
Hello guys i have a matrix W(418*413) i need to do a "for cycle" that goes from 2:417 and that goes from 2:412 but instead of writing down the final number i want write "end-1" but when i write end it assumes that im ending the cycle of course, how can i write the right way so it can identify that it goes from 2 line till end-1.
P.e. for nx=2:412 but instead of writing 412 i want it "end-1"
for ny=2:417 the same here.
end end
Respuesta aceptada
Más respuestas (1)
Iain
el 15 de En. de 2015
for i = 2:numel(x)
do stuff
end
2 comentarios
Jah-lahfui
el 15 de En. de 2015
Stephen23
el 16 de En. de 2015
Iain is right: numel is the way to get the result that you want.
Categorías
Más información sobre Programming en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!