How to plot the graph of Greatest Integer Function ?
5 次查看(过去 30 天)
显示 更早的评论
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 个评论
Eric Strobel
2021-1-17
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)
回答(4 个)
Jos (10584)
2016-6-8
x=linspace(1,10,10)
y=floor(x) % ARE THESE VALUES AS EXPECTED??
stairs(x,y) % rather than stem
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Title 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
