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

Home » Public Forums » archive » 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
CORRELATE where is the problem? [message #65472] Sun, 08 March 2009 10:40 Go to previous message
xiao zhang is currently offline  xiao zhang
Messages: 81
Registered: June 2008
Member
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
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Function Makes Unexpected Appearance
Next Topic: Use of ++ operator to count frequency of an entry (Was: Majority Voting)

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

Current Time: Fri Oct 10 14:27:21 PDT 2025

Total time taken to generate the page: 2.23316 seconds