From c7017a662f1cc4b826c38164da9886f6118fbaef Mon Sep 17 00:00:00 2001 From: Leahy Date: Thu, 14 Dec 2017 19:22:57 -0500 Subject: [PATCH] 1 --- least_squares.m | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 least_squares.m 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 -