summaryrefslogtreecommitdiff
path: root/regress.m
blob: 5a7336baf03fedec48cd2fcbf46c3fd9f209184e (plain)
1
2
3
4
5
6
function [m, n] = regress(x, y)
  mn = [ x ones(length(x), 1) ] \ y;
  m = mn(1);
  n = mn(2);
endfunction