author | Francesco Abbate <francesco.bbt@gmail.com> | 2012年12月31日 16:55:42 +0100 |
---|---|---|
committer | Francesco Abbate <francesco.bbt@gmail.com> | 2013年01月05日 23:49:53 +0100 |
commit | a573b3d4c3fc1f1cb81b0aafdfc3f3cf58b794cc (patch) | |
tree | 0ea906159b7edcfe9ceb51fb2a8ad95d6da8365c /gdt-plot.lua | |
parent | 17b2cfc6223c61693ddfcce8880ff0e89616e432 (diff) | |
download | gsl-shell-a573b3d4c3fc1f1cb81b0aafdfc3f3cf58b794cc.tar.gz |
-rw-r--r-- | gdt-plot.lua | 15 |
diff --git a/gdt-plot.lua b/gdt-plot.lua index 55ad3f59..68aec567 100644 --- a/gdt-plot.lua +++ b/gdt-plot.lua @@ -388,22 +388,7 @@ local function set_elements(X, P, i, ...) end end -local function gdt_table_linfit(t, f, jy) - local N, M = t:dim() - local row = t:cursor() - local P = count_args(f(row)) - - local X, Y = matrix.alloc(N, P), matrix.alloc(N, 1) - for i, row in t:rows() do - set_elements(X, P, i, f(row, i)) - Y:set(i, 1, t:get(i, jy)) - end - - return num.linfit(X, Y) -end - gdt.barplot = gdt_table_barplot gdt.plot = gdt_table_lineplot gdt.xyplot = gdt_table_xyplot gdt.reduce = gdt_table_reduce -gdt.lm = gdt_table_linfit |