Drawing mesh figure in MATLAB

995 Views Asked by At

I want to draw a figure of the mesh which the interval (0,1) ared divided into 8 equalsize subintervals. Which comment do I need to use ? The points needs to be on the natural straiht line. Thanks

2

There are 2 best solutions below

0
On BEST ANSWER
L = 0:1/8:1;
plot(L,zeros(size(L)),'.','MarkerSize',14);
hold on
plot([0 1],[0 0],'k')
0
On
x=linspace(0,1,8);
y=zeros(1,8);
stem(x,y)