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

Home » Public Forums » archive » Oddities with the linfit function
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Oddities with the linfit function [message #91622] Thu, 06 August 2015 14:51 Go to previous message
wdolan is currently offline  wdolan
Messages: 29
Registered: June 2015
Junior Member
I've got an array for X, and an array for y.

so I do this

plot, x,y, psym=1
result=linfit(x,y)
print, result

and instead of getting the usual 2 things that are the m and the b of the y=mx+b, I get three. The first two things I think are the m and b, and the third thing I though was the r^2. But if I multiply the x value by -1 so everything flips, then do linfit, I get the identical third value, but negative...

Not sure why I get three things, and I'm not sure how to get the real r^2 value.

Thanks for your help!
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: cgScatter2D label
Next Topic: What's New in IDL 8.4

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

Current Time: Wed Oct 08 11:55:09 PDT 2025

Total time taken to generate the page: 0.00268 seconds