[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ESPResSo-users] LinRegression
From: |
Peter Kosovan |
Subject: |
Re: [ESPResSo-users] LinRegression |
Date: |
Wed, 17 Aug 2011 10:56:38 +0200 (CEST) |
User-agent: |
Alpine 2.00 (LNX 1167 2008-08-23) |
Hi Jiajia
Try out the following:
set mylist [list {1.0 1.0} {2.0 1.9} {3.0 3.1} {4.0 4.2} {5.0 4.9}];
puts $mylist;
puts [LinRegression $mylist];
Obviously, you need pairs of { x y } values for the regression, so a
single-level list would not do.
It is clearly stated in the comments of the "ABHmath.tcl" file in the scripts
directory where it is implemented.
However, the user guide is not clear about how the list should be structured so
I will fix it.
peter
--
Peter Košovan
Institute of Computational Physics
University of Stuttgart
Pfaffenwaldring 27
70569 Stuttgart
Germany
On Wed, 17 Aug 2011, Jiajia Zhou wrote:
Dear Espresso Users,
Could anyone give me some suggestions about how to use the
LinRegression to do linear fit? The user manual says
LinRegression <l>
I tried a simple script like:
set myList "1 2 2 4 3 6 4 8"
puts "[LinRegression myList]"
and the error message is
not enough points for regression
while executing
"error "not enough points for regression""
(procedure "LinRegression" line 9)
Increasing number of points doesn't seem to help though.
Thanks for your help!
Jiajia