least square matrix [message #43027] |
Fri, 11 March 2005 01:33 |
Matthias Demuzere
Messages: 9 Registered: April 2004
|
Junior Member |
|
|
Hi,
Because my question maybe still a bit unclear, here it is again:
I have a dataset of temperatures taken at hourly steps (k-value, ranging
from 1-24) for a whole
month (with i days). Now, I would like to compare each temperature Tk,i with
every other Tk,j with j the same number of days as in i. I would like to do
that comparison by least square methods like this
Matrix Ai,j = sum (Tk,i-Tk,j)^2
where the matrix Ai,j is a symmetrical matrix (because i,j are the same
day).
How can that be done in IDL?
I was thinking of some FOR statements, like this:
FOR i=1, i LE 31, i++ DO BEGIN
FOR j=1, j LE 31, j++ DO BEGIN
FOR k=1, k LE 24, k++ DO BEGIN
function
ENDFOR
ENDFOR
ENDFOR
But this doesn't seems to work really...Any idees, tips,...??
Thanks,
Matthias
--
************************************************************
************************************************************
Physical and Regional Geography Research Group
Redingenstraat 16
B-3000 Leuven
Belgium
Tel: +32 16 326453
Fax: +32 16 326400
E-mail: Matthias.Demuzere@geo.kuleuven.ac.be
|
|
|
Re: LEAST SQUARE MATRIX [message #43040 is a reply to message #43027] |
Wed, 09 March 2005 09:13  |
Matthias Demuzere
Messages: 9 Registered: April 2004
|
Junior Member |
|
|
Sorry,
I had a formula typed in matthype in here, but I think its gone...
Here is my question again:
I have a dataset of temperatures taken at hourly steps (k-value) for a whole
month (i-value). Now, i would like to compare each temperature Tk,i with
every other Tk,j with j the same number of days as in i. i would like to do
that comparison by least square methods like this
Matrix Ai,j = sum (Tk,i-Tk,j)^2
where the matrix Ai,j is a symmetrical matrix (because i,j are the same
day).
How can that be done in IDL?
Tips, idees, everything is welcome...
Thanks,
Matthias
"Matthias Demuzere" <Matthias.demuzere@geo.kuleuven.ac.be> wrote in message
news:1110385467.646608@seven.kulnet.kuleuven.ac.be...
> Hi,
>
> Could anyone help me with the construction of a least square matrix in IDL
> indicated by A
>
> where i,j =1, 2,...,N
>
> Tips, idees, everything is welcome...
> Thank you!!
>
> Matthias
> --
> ************************************************************
> ************************************************************
> Physical and Regional Geography Research Group
> Redingenstraat 16
> B-3000 Leuven
> Belgium
>
> Tel: +32 16 326453
> Fax: +32 16 326400
> E-mail: Matthias.Demuzere@geo.kuleuven.ac.be
>
>
>
|
|
|
Re: LEAST SQUARE MATRIX [message #43041 is a reply to message #43027] |
Wed, 09 March 2005 08:53  |
James Kuyper
Messages: 425 Registered: March 2000
|
Senior Member |
|
|
Matthias Demuzere wrote:
> Hi,
>
> Could anyone help me with the construction of a least square matrix in IDL
> indicated by A
>
> where i,j =1, 2,...,N
>
> Tips, idees, everything is welcome...
Well, the least square matrix in IDL would probably be:
bytarr(1,9223372036854775807)
However, I suppose that most systems won't have enough memory to create
it. :-)
You need to make your question more specific. You've left out a lot of
details, starting with what 'i', 'j', and 'N' mean. However, that's just
the beginning. "least squares" is a criterion that is often used to fit
a model to some data. However, to answer your question we need to know
at least a little bit about what kind of model and what kind of data
you're looking at.
|
|
|