Plotting multiple plots on the same graph using a 'for' loop

21 ビュー (過去 30 日間)
Swasti Saxena
Swasti Saxena 2016 年 10 月 27 日
コメント済み: Swasti Saxena 2016 年 10 月 27 日
The hold on command is not working in a 'for' loop, and I am ending up with 50 separate plots. How do I plot them on a single graph?

採用された回答

Walter Roberson
Walter Roberson 2016 年 10 月 27 日
Do not use figure() within the for loop.
figure(); %outside the loop
for K = 1 : 20
plot(rand(1,75));
hold on
end

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGraphics Performance についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by