# I am trying to plot the value of the function P(x,y) along the line segment that connects (0,0) and (6,4)

2 views (last 30 days)

Show older comments

##### 3 Comments

Roger Stafford
on 9 Oct 2013

### Answers (1)

Honglei Chen
on 8 Oct 2013

Edited: Honglei Chen
on 8 Oct 2013

I think you need to use plot3 for this. You need to first find x and y points you want. For example

x = 0:0.01:6;

y = 4/6*x;

z = x+y;

plot3(x,y,z);

##### 0 Comments

### See Also

### Categories

### Community Treasure Hunt

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

Start Hunting!