how can i draw a line on already plotted graph?

i was working on pearson correlation formula and was success but while plotting graph i want a line on already plotted graph like for positive correlation increasing line from (0,0) to some extent increasing like(10,10) is it possible?? how??

Answers (1)

Use hold on
hold on
plot([0 10],[0 10])
%or
hold on
line([0 10],[0 10])
See
doc plot

4 Comments

no use Azzi abdelmalek its not working properly
no line is being plotted on it
In windows command type and tell what you've got
xlim
ylim
sampath, do we have to guess at your code, or are you going to speed things along by showing us your code?

Sign in to comment.

Categories

Asked:

on 3 Mar 2013

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!