Adding specified loop outputs
Mostra commenti meno recenti
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 Commenti
Mathieu NOE
il 29 Mar 2024
hello again
what is the size of output ?
S
il 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).
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Logical in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
