Clear Filters
Clear Filters

Plot a line, changing origin

4 views (last 30 days)
Adrian
Adrian on 16 Sep 2013
Hello,
I have 2 vectors containing x and y-coordinates. Now I want to plot these points and connect them to a line. How can I do this without starting from (0,0)? Actually the line always begins at (0,0) although this point is not content of the vectors!

Accepted Answer

Simon
Simon on 16 Sep 2013
Hi!
x = [1 2 3];
y = [2 4 9];
plot(x,y);
This doesn't start at (0,0). If you have problems please post your code.
  1 Comment
Adrian
Adrian on 18 Sep 2013
You are right, I did an other (stupid) mistake!
Thank You

Sign in to comment.

More Answers (0)

Categories

Find more on Formatting and Annotation in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!