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

Home » Public Forums » archive » Re: CORRELATE where is the problem?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: CORRELATE where is the problem? [message #65471] Sun, 08 March 2009 12:39 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
xiao writes:

> Hi~ everyone. I have a simple question here. I have two arrays and I
> calculated the correlation between them. The result is 0.49. But when
> I use the equation to calculate the correlation. The result is 0.99.
> And I can see from the plot that they are actually highly correlated.
> Why is that? THX
>
> openr,1,'data.txt'
> data=fltarr(2,1227)
> readf,1,data
>
> temp=data(1,*)
> oo=data(0,*)
> ;print,temp(0)
>
> temp=reform(temp)
> oo=reform(oo)
>
> corr=CORRELATE(oo,temp)
> print,corr
> rr=LINFIT(temp,oo)
> print,rr
> plot,psym=2,temp,oo

Which equation are you talking about? My guess is
you have constructed the equation incorrectly.

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Previous Topic: Re: about ENVI_display_bands
Next Topic: Black Widgets Draw Window in d_plot2d and d_gridding

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

Current Time: Wed Oct 08 15:33:48 PDT 2025

Total time taken to generate the page: 0.00352 seconds