help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fitting with leasqr and uncertainties


From: CdeMills
Subject: Re: Fitting with leasqr and uncertainties
Date: Tue, 21 Jan 2014 08:42:57 -0800 (PST)

st.michal88 wrote
>   what do I fit with:
> Function is more or less: y(t)=param1*exp(-(t-param2))+param3

Hello,

Carnë has created a new entry. For now:
1) cd to some place inside your octave dir
2) type 'hg clone hg.code.sf.net/p/octave/prony"
3) this will create a new dir whose name is "prony". Add 'prony/inst' to
your PATH

4) quick and dirty example

x=exp(-1.2*(1:10));
x =

 Columns 1 through 7:

   0.88692   0.78663   0.69768   0.61878   0.54881   0.48675   0.43171

 Columns 8 through 10:

   0.38289   0.33960   0.30119

[B,Z,Lam]=pronysq(x, 1, 1)
B =

   8.8692e-01
  -3.1895e-15

Z =

   0.88692   1.00000   1.00000   0.00000  -0.88692

Lam =

  -0.12000   1.00000
        NA        NA

B contains the linear weights; the first one is for the exponential, the
second for the offset (here: 0)
Z contains the digital poles : 0.88692, with multiplicity one, and real.
Notice is is || < 1, stable
Lam is the time constant: here -1.2 with single multiplicity; i.e. a pure
exponential. Notice it is < 0, so stable. Lam contains padding to have the
same number of lines as B

Try, check, and please provide feedback.

Regards

Pascal



--
View this message in context: 
http://octave.1599824.n4.nabble.com/Fitting-with-leasqr-and-uncertainties-tp4661189p4661216.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]