필터 지우기
필터 지우기

plotting using semilogy in a loop

조회 수: 6 (최근 30일)
James Connor
James Connor 2015년 12월 1일
답변: dpb 2015년 12월 1일
say I have
s= 0.604098184248020 0.642263089970519 3.73235669061904 0.147329697780077 0.238159152322172 0.0172071450520552 0.00180492811644228
the values for s are going to change each time my loop gets called. How do I plot them using semilogy() in which the x-axis is the number of values in s, this case the number is 7. And have it work so on the next call of semilogy in my loop it plots new values of s on the same figure.

답변 (1개)

dpb
dpb 2015년 12월 1일
See
doc hold
Set
hold on
after the first iteration and add the subsequent lines. You'll want to cycle the color to distinguish the lines (altho seems like maybe I saw one change in later versions is that the color property isn't reset with hold any longer???? You can check easily enough)...

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by