oops, sorry for the missing %-sign. Unfortunately after correcting it, I
still have a problem with the result Maxima offers me:
[a = - 3.0489875948438647E-7, b = 9.894424748229691]
even though the value of 'b' is acceptable 'a' can't be negative because
it represents the series resistance of an RC-network (nominal values R=10
ohm and C=100nF) so 'a' should in fact
be around 10 which is the reason why I choose that as een initial value. Is there a way to force Maxima not
to use negative a values/stick closer to the initial values?
I also tried an alternative expression which gives worse results:
lsquares_estimates
(m,[x,y],y=sqrt((a^2)+((1/(2*%pi*x*b))^2)),[a,b],initial=[10,90e-9]);
now both a and b are way off their estimated values:
[[a = 3094.318570260793, b = 1.032417178270959]]
any ideas how to solve this best?
best regards,
hugo
On Fri, 11 Jun 2010, Leo Butler wrote:
>
>
> On Fri, 11 Jun 2010, Hugo Coolens wrote:
>
> < After seeing the use of maxima for fitting data in this list I wanted to try
> < it out myself on some data, unfortunately in the end I get an error with
> < Maxima:
> < m:matrix([100,16000],[200,8000],[500,3636],[1000,1818],[2000,870],[5000,323],[10000,160],[20000,83],[50000,33],[10000,20]);
> < load (lsquares)$
> < lsquares_estimates
> < (m,[x,y],y=sqrt((a^2)+((10e7/(2*pi*x*b))^2)),[a,b],initial=[10,10]);
> <
>
> In Maxima, the constant pi is stored in %pi.
> Leo
>
> --
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.
>
>