MATLAB: How to plot this figure?

MATLABplot

Best Answer

REad about stem.
y = rand(1,10) ;
stem(y)
xlabel('x')
ylabel('y')