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

Home » Public Forums » archive » Re: linfit and regress questions
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: linfit and regress questions [message #56690 is a reply to message #56686] Sun, 11 November 2007 08:49 Go to previous messageGo to previous message
Vince Hradil is currently offline  Vince Hradil
Messages: 574
Registered: December 1999
Senior Member
On Nov 11, 10:42 am, rlaybe...@hotmail.com wrote:
> On 11 Nov, 16:37, hradilv <hrad...@yahoo.com> wrote:
>
>
>
>> On Nov 11, 10:27 am, rlaybe...@hotmail.com wrote:
>
>>> Hi
>
>>> I am interested in fitting a line of the form y=mx+c using regress or
>>> linfit. I want the option of fixing the value of c at zero. Can I do
>>> this in either of these 2 functions or would I need to use something
>>> else?
>
>>> Thanks
>
>>> Russ
>
>> Just write it yourself:
>
>> mhat = total(x*y)/total(x*x)
>
>> http://mallit.fr.umn.edu/fr5218/reg_refresh/origin.html
>
> thanks. is that really true? this gives the best fit? great, that's
> one problem solved. what about if I want to set the intercept to c1?
>
> russ

Transform the data?

mhat = total(x*(y-c1))/total(x*x)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: FLAASH Atmospheric Module
Next Topic: Re: icontour scaling color table

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

Current Time: Sat Oct 11 12:52:23 PDT 2025

Total time taken to generate the page: 1.20188 seconds