[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ESPResSo-users] LinRegression
From: |
Jiajia Zhou |
Subject: |
Re: [ESPResSo-users] LinRegression |
Date: |
Wed, 17 Aug 2011 13:25:13 +0200 |
Hi Peter,
Thanks a lot for your help. It works.
One small thing, the return values of LinRegression are actually in
order of "b a db da" if assuming the fitting function is a*x+b.
Cheers,
Jiajia
On Wed, Aug 17, 2011 at 10:56 AM, Peter Kosovan
<address@hidden> wrote:
> 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
>