Adding specified loop outputs
Mostrar comentarios más antiguos
I am trying to make a figure which plots the sum of 3 specific loop outputs. output is the different outputs of the loop and I am trying to get the sum of output 1, 2, and 3. This is what I have:
figure
Sum1=sum(output(1:3));
plot(t,Sum1)
But I am just getting a blank graph and Sum1 for some reason has a value of 0 in my workplace. I am not sure which part of what I am doing is incorrect. Thank you for your time!
4 comentarios
Mathieu NOE
el 29 de Mzo. de 2024
hello again
what is the size of output ?
S
el 30 de Mzo. de 2024
Example:
output = rand(5,2000)
output(1:3)
Sum1=sum(output(1:3))
Thus you try to plot one single value (which seems to be 0 in your case).
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Logical 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!
