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 Kommentar

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

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Rik
Rik am 13 Dez. 2021

0 Stimmen

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

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Hilfe-Center und File Exchange

Tags

Gefragt:

am 13 Dez. 2021

Beantwortet:

Rik
am 13 Dez. 2021

Community Treasure Hunt

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

Start Hunting!

Translated by