function [m, k] = slopeIntercept(p, q)
%SLOPEINTERCEPT Slope and y-intercept of a line
%   [m, k] = slopeIntercept(p, q) returns the slope m and the 
%   y-intercept k of the line passing through the points p and q.

xp = p(1);
yp = p(2);

xq = q(1);
yq = q(2);

m = (yq - yp) / (xq - xp);
k = yp - m * xp;

end
