% lab05.m  P. Conrad  CISC106  09/25/06
% input 2 points in plane
% output the slope, or the word "undefined"

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

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

