plotting discrete graph from 0 to 20

hey there!
Trying to plot the discrete time graph : Y[x] = 1 (if 0<=x <= 20);
how do I do that?
tries using plot and dont know how to do it
thanks

댓글 수: 1

Yuval Levy
Yuval Levy 2021년 12월 13일
and its DISCRETE and so i want it to be only if x is 0,1,2,3,....,20
thanks again :)

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

답변 (1개)

Rik
Rik 2021년 12월 13일

0 개 추천

You should be using plot with only the markers then.
plot(0:20,ones(21,1),'*')

카테고리

도움말 센터File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

질문:

2021년 12월 13일

답변:

Rik
2021년 12월 13일

Community Treasure Hunt

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

Start Hunting!

Translated by