MATLAB: How to plot line with dots

MATLAB

I have a two matrix X and Y. I want to make a line graph with dots with plot function.
plot (x,y,'–ok');
it is just plotting black circles but ı want to plot line too with circles.

Best Answer

There are several options:
x = 1:10;
y = rand(1,10);
subplot(3,1,1)
plot(x, y, '-ok')
title('Circles and Lines')
subplot(3,1,2)
plot(x, y, 'ok', 'MarkerFaceColor','k')
title('Filled Circles')
subplot(3,1,3)
plot(x, y, '.k')
title('Dots')
One of those (or a combination of them) should do what you want.
.