diff --git a/least_squares.m b/least_squares.m deleted file mode 100644 index 9e5876a..0000000 --- a/least_squares.m +++ /dev/null @@ -1,11 +0,0 @@ -function [a,fx,r2] = least_squares(Z,y); -%function that accepts a z-matrix and dependent variable and returns the vector of best-fit constants, a best-fit function, and the coefficient of determination, r2 -a = Z\y; -fx = Z*a; -e = y-fx; -st = std(y); -sr = std(e); -r2 = (st-sr)/st; - -end -