MATLAB: How to plot dots

points

Hi, Sorry I am new here, I will like to know how to plot pointers/markers within a line? (Through programming code) I am able to plot a line just that I could not plot pointers on the line. Is there a command to plot every pointer within 0.5 difference?
Thanks.

Best Answer

There are a couple ways. Here's a simple one:
figure
plot(1:10,'.-');
"doc plot" will give you info on the different choices for marker and line styles.
Slightly more complicated, but worth learning, is how to manipulate the properties of the line after you have plotted it. Here is an example:
figure
h = plot(1:10);
set(h,'Marker','square')
You can achieve control over nearly ever aspect of your plots when you know how to use "handle graphics", which is the term for these manipulations.
Here is a longer document that goes into great detail about how to use handle graphics: http://www.mathworks.com/support/tech-notes/1200/1205.html