I have two points lets say:
Now i want to draw a l
If you have the Computer Vision toolbox. You can simply use shapeInserter.
Check out http://www.mathworks.com/help/vision/ref/vision.shapeinserter-class.html
To specify lines, you have to use the line below. Otherwise, you may get a rectangle
Example:
%draw a line from point (100,100) to (200,200) on an image saved as nextFrame
line = int32([100 100 200 200]);
shapeInserter = vision.ShapeInserter('Shape', 'Lines');
nextFrame = step(shapeInserter, nextFrame, line);
Take a look at the properties to see what you can edit.