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

Home » Public Forums » archive » Re: Is zero-degree fitting possible?
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: Is zero-degree fitting possible? [message #6024 is a reply to message #6019] Wed, 10 April 1996 00:00 Go to previous message
korpela is currently offline  korpela
Messages: 59
Registered: September 1993
Member
In article <4kgkvb$kpj@lastactionhero.rs.itd.umich.edu>,
Khai Trinh Pham <kpham@umich.edu> wrote:
>
> I am having problems doing a very simple zero-degree fit, i.e. fitting
> only one parameter. I've tried POLY_FIT, CURVEFIT, and SVDFIT.
> They each return the following error:
>
> IDL> F = POLY_FIT(Ycalculated, Yexperiment, 0)
> % INVERT: Input must be a square matrix: A.
> % Error occurred at: POLY_FIT 79 @IDL_DIR:[LIB]LIB.TLB(POLY_FIT)

The internal invert function cannot invert a 1x1 array. Kind of silly.

> I just want to find F such that (F * Ycalculated) gives the best fit
> to (Yexperiment).
>
> Am I missing something really simple here?

It looks to me that what you want is....

f=total(Yexperiment)/total(Ycalculated)

Which is the solution to

n
---
> ( f*y_c -y_e) = 0
---
0

or better yet, minimize the rms of (f*y_c-y_e) which would
give you.....

f=total(Yexperiment*Ycalculated)/total(Ycalculated*Ycalculat ed)

Eric

--
Eric Korpela | An object at rest can never be
korpela@ssl.berkeley.edu | stopped.
<a href=" http://www.cs.indiana.edu/finger/mofo.ssl.berkeley.edu/korpe la/w">
Click here for more info.</a>
[Message index]
 
Read Message
Read Message
Previous Topic: character thickness of contour labelling
Next Topic: IDL procedures to get theromdynamic parameters from Soundings

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

Current Time: Sat Oct 11 07:29:45 PDT 2025

Total time taken to generate the page: 0.64025 seconds