Drawing slope

2 views (last 30 days)
Raviteja
Raviteja on 24 Feb 2012
Can we draw a line with the slope vector
m =[-0.74586; -0.6661]
if yes how ?

Answers (1)

Wayne King
Wayne King on 24 Feb 2012
You do not say which of your elements above is the intercept and which is the slope.
x = -2:.01:2;
y = m(1)+m(2)*x;
plot(x,y)
or
x = -2:.01:2;
y = m(2)+m(1)*x;
plot(x,y)

Categories

Find more on MATLAB in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!