Adding specified loop outputs
古いコメントを表示
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 件のコメント
Mathieu NOE
2024 年 3 月 29 日
hello again
what is the size of output ?
S
2024 年 3 月 30 日
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).
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
