필터 지우기
필터 지우기

Many many functions in a plot?

조회 수: 2 (최근 30일)
kevin cecere palazzo
kevin cecere palazzo 2019년 10월 2일
답변: the cyclist 2019년 10월 2일
I have a "for" cycle in which for every repetition I end up with a vector of which I have to compute and plot the empirical distribution function. If I have for example 500 repetitions, how can I plot all of them in the same figure? They are all defined on the interval [0,1] and take value, obviously, in [0,1].
  댓글 수: 1
Rik
Rik 2019년 10월 2일
You can use hold on, but with increasing numbers of plots, the performance of Matlab will decrease and so will the usefulness of your plot.

댓글을 달려면 로그인하십시오.

채택된 답변

the cyclist
the cyclist 2019년 10월 2일
figure
hold on
for i = 1:500
plot(rand(3))
drawnow
pause(0.1)
end
You don't need to drawnow or pause commands. I added them to slow things down so it is possible to see each line being drawn.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Graphics Performance에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by