diff options
author | Puneeth Chaganti | 2010-12-01 16:51:35 +0530 |
---|---|---|
committer | Puneeth Chaganti | 2010-12-01 16:51:35 +0530 |
commit | f3a34dfb4e879f3eb7274704f44546aac4add88f (patch) | |
tree | 1cb0a8cc5dbd5ee2b374350915ed2addfa0fb447 /least_square_fit/quickref.tex | |
parent | 347866ed0d29db61ee062563b1e1616cfb85588c (diff) | |
download | st-scripts-f3a34dfb4e879f3eb7274704f44546aac4add88f.tar.gz st-scripts-f3a34dfb4e879f3eb7274704f44546aac4add88f.tar.bz2 st-scripts-f3a34dfb4e879f3eb7274704f44546aac4add88f.zip |
Renamed all LOs to match with their names in progress.org.
Diffstat (limited to 'least_square_fit/quickref.tex')
-rw-r--r-- | least_square_fit/quickref.tex | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/least_square_fit/quickref.tex b/least_square_fit/quickref.tex new file mode 100644 index 0000000..e057739 --- /dev/null +++ b/least_square_fit/quickref.tex @@ -0,0 +1,15 @@ +Creating a matrix with all ones:\\ +{\ex \lstinline| o = ones_like(l)|} + +Creating the A matrix:\\ +{\ex \lstinline| A = array(l, ones_like(l)).T|} + +Computing least square:\\ +{\ex \lstinline| result = lstsq(A, tsq)|} + +Obtaining the m and c values:\\ +{\ex \lstinline| m, c = result[0]|} + +Computing the least square fit line:\\ +{\ex \lstinline| lst_line = m * l + c|} + |