my plot won't show graph

조회 수: 1 (최근 30일)
Shahadat Hossain
Shahadat Hossain 2021년 8월 23일
댓글: Adam Danz 2021년 8월 30일
t=12:0.01:12;
x=sin(t);
plot(t,x)

채택된 답변

Adam Danz
Adam Danz 2021년 8월 23일
편집: Adam Danz 2021년 8월 27일
That's because there's only 1 point and it takes >=2 points to form a line. By default, plot() does not show markers, only lines.
The reason there is only 1 point is because there is only 1 value in t:
t=12:0.01:12
t = 12
x=sin(t);
plot(t,x, 'o-')
  댓글 수: 2
Shahadat Hossain
Shahadat Hossain 2021년 8월 28일
thanks a lot adam i am student currently studying signal system and trying to understand matlab
Adam Danz
Adam Danz 2021년 8월 30일
Happy to help.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by