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

Home » Public Forums » archive » Re: How to get the center and radius for a x,y array
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: How to get the center and radius for a x,y array [message #65026 is a reply to message #64976] Mon, 09 February 2009 20:23 Go to previous message
Jeremy Bailin is currently offline  Jeremy Bailin
Messages: 618
Registered: April 2008
Senior Member
On Feb 7, 2:21 am, oupin <hhb1...@gmail.com> wrote:
> On Feb 7, 9:06 am, Vince Hradil <vincehra...@gmail.com> wrote:
>
>
>
>> On Feb 6, 7:05 pm, Vince Hradil <vincehra...@gmail.com> wrote:
>
>>> On Feb 6, 6:52 pm, oupin <hhb1...@gmail.com> wrote:
>
>>>> On Feb 7, 12:19 am, Vince Hradil <vincehra...@gmail.com> wrote:
>
>>>> > On Feb 6, 10:09 am, oupin <hhb1...@gmail.com> wrote:
>
>>>> > > I want to get the center and radius for a 2-D array which includes x,y
>>>> > > values. Could you give me some suggestions and examples?
>
>>>> > We're going to need more details.  You have (x,y) pairs?  Do you want
>>>> > Center-of-mass?  What do you mean by "radius"?  Do you want to fit a
>>>> > circle?
>
>>>> Yes, I have (x,y) pairs, and want to fit a circle using these data,
>>>> and calculate the center and radius of the circle.
>
>>> Ah - so just minimize sum{ r*r - ( (xi-xc)*(xi-xc) + (yi-yc)*(yi-
>>> yc) ) } to find [r,xc,yc].
>
>> Is that right - I'm getting tired... it's something like that anyway.
>
> yes, that is what I mean

POWELL will probably work for you. Just define a function that
calculates the sum that Vince gave (you'll probably need to use a
common block to pass through your x,y pairs - at least, that's usually
how I do it) and feed it into POWELL.

-Jeremy.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Reduced chi-square goodness-of-fit statistic
Next Topic: Re: NASA IDL Astronomy Library Still There?

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

Current Time: Sat Oct 11 13:09:23 PDT 2025

Total time taken to generate the page: 1.27992 seconds