% lab06.m  P. Conrad Section 019 Fall 2006
% a program to compute the slope of a line

x1 = input('please enter x1: ');
y1 = input('please enter y1: ');
x2 = input('please enter x2: ');
y2 = input('please enter y2: ');

if (x1 == x2 )
     display('slope is undefined');
else
     m = (y2 - y1) / (x2 - x1);
     disp(['slope is ' num2str(m) ]);
end

