How do I fprintf a title for every third iteration in a loop?

3 visualizaciones (últimos 30 días)
J
J el 3 de Mzo. de 2018
Respondida: Jos (10584) el 3 de Mzo. de 2018
This is the output I have to achieve. I'm able to get the reactions but I don't know how to get the Reaction sub mechanism: # title for every third reaction and the matrix shown after every third reaction. I screenshotted the output starting at sub reaction 7 because the first 6 sub reactions began with r1 which could be solved with an if statement within the loop like I initially did. The sub reactions go from 1-15.
Thanks for the help!

Respuestas (1)

Jos (10584)
Jos (10584) el 3 de Mzo. de 2018
In pseudocode it would look like this:
if mod(linecounter,3)==0
print header
end
print line
linecounter = linecounter + 1

Categorías

Más información sobre Loops and Conditional Statements en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by