help-octave
[Top][All Lists]
Advanced

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

independent variable in function for leasqr


From: oxyopes
Subject: independent variable in function for leasqr
Date: Sun, 8 Jul 2007 21:23:31 +0200

Hi people,
i do not understand why leasqr does not read my function correctly.
In the function A = inline("  Ao*exp(-D*x^2*k)   "), x is the independent
variable and A the observed values. Ao and D are constants to be optimized.
k is a known constant. I am trying sth like:
g=(1:2:10)';
A=exp(g);
F = inline("  Ao*exp(-D*x^2*k)   ");
Ao=1; k=2; guess=[1 0.1]';
[f1, p1, kvg1, iter1, corp1, covp1, covr1, stdresid1, Z1, r21] = ...
leasqr(g,A, guess, F )

Well, how do i tell leasqr that i want to optimize D and not K at the exponent
of F function? What is wrong with this sequence?
Sorry that it is so similar to the example, but i really did not get it :-o
Thanks in advance for any help ...


reply via email to

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