Adding specified loop outputs
Afficher commentaires plus anciens
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 commentaires
Mathieu NOE
le 29 Mar 2024
hello again
what is the size of output ?
S
le 30 Mar 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).
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Logical dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
