help-octave
[Top][All Lists]
Advanced

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

Re: leasqr help


From: Francesco Potorti`
Subject: Re: leasqr help
Date: Wed, 09 Apr 2008 14:02:02 +0200

>I would like to use leasqr for non linear minimization.
>
>Am I wrong or it seems that leasqr calculate direclty the "chi2" ?

I do not know.

>In case a have a "Matrix" as data, would it work right ?
>In this case my "function" should return a matrix as well ?

Supposing that by "data" you mean the "observed values", the answer is
no: the function should return a scalar value.

However, you can work around this limitation.  For example, suppose you
have a function Fm with three parameters a,b,c which returns a 3x3
matrix.  Then you can optimize a function Fs instead, defined like this:

function ret = Fs (a,b,c,i,j)
  ret = Fm(a,b,c)(i,j)
endfunction

thus independently minimising the distance between each element of the
matrices.  If instead you need to measure the distance between matrices
in some other specific way, it should be not so difficult to change
leasqr.m to use your distance rather than squared difference of scalars.

-- 
Francesco Potortì (ricercatore)        Voice: +39 050 315 3058 (op.2111)
ISTI - Area della ricerca CNR          Fax:   +39 050 315 2040
via G. Moruzzi 1, I-56124 Pisa         Email: address@hidden
Web: http://fly.isti.cnr.it/           Key:   fly.isti.cnr.it/public.key


reply via email to

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