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

Home » Public Forums » archive » Re: fit 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
Re: fit function [message #27320 is a reply to message #27318] Tue, 16 October 2001 11:57 Go to previous messageGo to previous message
Pavel A. Romashkin is currently offline  Pavel A. Romashkin
Messages: 531
Registered: November 2000
Senior Member
Reimar Bauer wrote:
>
> Dear all,
>
> I need a fit function which returns y=mx^n.
>
> Is someone able to share some code.

Maybe, the following will do?

FUNCTION junk, p, x=x, y=y
return, y - (p[0]*x^p[1])
END

; Here, X and Y are your vectors to be fitted.

coefs = MPFIT('junk', [1.d, 1.d], functargs={x:x, y:y}, /quiet)

This assumes that, just like everybody else, you have in your path
everything Craig cared to post on his web site :-)
Cheers,
Pavel
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: the dimension of array
Next Topic: bug in contour?

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

Current Time: Wed Oct 08 19:29:00 PDT 2025

Total time taken to generate the page: 0.00512 seconds