Plotting multiple plots on the same graph using a 'for' loop
조회 수: 14 (최근 30일)
이전 댓글 표시
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?
댓글 수: 0
채택된 답변
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 Exchange에서 Graphics Performance에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!