How to plot the graph of Greatest Integer Function ?
Mostra commenti meno recenti
I was trying to plot greatest integer function by using floor command and stem (to show discontinuity) but what i am getting is,please help me out!!!
I used the code
x=linspace(1,10,10) y=floor(x); stem(x,y)
2 Commenti
Jos (10584)
il 8 Giu 2016
What did you expect to see?
Eric Strobel
il 17 Gen 2021
This is close, I got this using the code below:

Dots are right, lines are going wrong way.
Code:
syms y
>> y=floor(x); x=linspace(1,10,10); stem(x,y)
Risposte (4)
Jos (10584)
il 8 Giu 2016
x=linspace(1,10,10)
y=floor(x) % ARE THESE VALUES AS EXPECTED??
stairs(x,y) % rather than stem
1 Commento
Vipul Sharma
il 8 Giu 2016
Vipul Sharma
il 8 Giu 2016
0 voti
Vipul Sharma
il 8 Giu 2016
0 voti
x=1:0.001:10;
y=floor(x);
plot(x,y,'.');
Categorie
Scopri di più su Title in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
