- #1
yaang
- 23
- 0
I want to plot a line in mathematica with a negative slope by setting it's starting point, length, and slope but i couldn't figure out how to do it.
example: A line "AB"
has a starting point (40,0)
has a length 10
has an angle 127 degrees between x axisIn MATLAB i can do this with
%%
k = 0:0.1:10;
x=40+k*cosd(127);
y=0+k*sind(127);
plot(x,y)
%%
Result:http://i53.tinypic.com/2lb18x.pngHow can i do this with mathematica ? Can anyone help ? (I don't want to draw it from it's end point to beginning point )
example: A line "AB"
has a starting point (40,0)
has a length 10
has an angle 127 degrees between x axisIn MATLAB i can do this with
%%
k = 0:0.1:10;
x=40+k*cosd(127);
y=0+k*sind(127);
plot(x,y)
%%
Result:http://i53.tinypic.com/2lb18x.pngHow can i do this with mathematica ? Can anyone help ? (I don't want to draw it from it's end point to beginning point )
Last edited: