MATLAB: Why is line function not working

line

Hai,
I used the line() function. It is not drawing the line between the points I specified, it is just blank. Why is it so? Looking for your reply.
BSD

Best Answer

You probably specified it wrong.
line([x1 x2],[y1 y2]), not line([x1,y1],[x2,y2])
line([0 1],[0 1]), not line([0 0],[1 1])