|
From: <pl...@pi...> - 2012-01-16 15:13:11
|
Hi,
I am wanting to run fit on each section of a long, indexed datafile.
While the symmetry of the syntax between plot and fit means this is
syntactically possible, it is in fact useless since only the final
fitted parameters are retained.
A similar problem occurs if I split the data file into separate files
and use the iteration feature.
help fit states:
<datafile> is treated as in the `plot` command. All the `plot datafile`
modifiers (`using`, `every`,...) except `smooth` and the deprecated `thru`
are applicable to `fit`. See `plot datafile`.
help plot | datafile :
Syntax:
plot '<file_name>' {binary <binary list>}
{{nonuniform} matrix}
{index <index list> | index "<name>"}
{every <every list>}
{thru <thru expression>}
{using <using list>}
{smooth <option>}
{volatile} {noautoscale}
One work around would be to try to process the fit log but since there
are other calls to fit this seems error prone and cumbersome.
>>
Final set of parameters Asymptotic Standard Error
======================= ==========================
Td = -0.294853 +/- 0.003685 (1.25%)
>>
A more optimal solution that would take full advantage of what is
possible in the syntax but seems currently in-exploitable would be if
the final fit results were stored in an internal array in the variable
name space for each call to fit.
Thus a call to fit with an iteration or an indexed datafile would
produce an array of all the fit results (presumably with NaN if the fit
fails).
regards, Peter.
|