comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » least square matrix
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
least square matrix [message #43027] Fri, 11 March 2005 01:33
Matthias Demuzere is currently offline  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 Go to previous message
Matthias Demuzere is currently offline  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 Go to previous message
James Kuyper is currently offline  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.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Extract an image
Next Topic: netCDF _FillValue attributes

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 13:34:43 PDT 2025

Total time taken to generate the page: 0.63954 seconds