Info
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
How do i do a for loop within a for loop with a variable changing n=1:42.
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
If i wanted to create a for loop where n=1:42, but there is another variable, l whose dimension is dependant on the variable n. how would i notate the change for l. for instance, if for n=2:6,9 l=1:16 but for n=42, l=1:53, how could i construct the for loops to give me outputs without the error "indices exceed matrix dimensions" Thanks
0 comentarios
Respuestas (1)
James Tursa
el 23 de Sept. de 2015
Why can't you use simple if-tests on the value of n to set the value of I?
1 comentario
Andrew Wiebe
el 23 de Sept. de 2015
Editada: Stephen23
el 23 de Sept. de 2015
La pregunta está cerrada.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!