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

Home » Public Forums » archive » Re: Center of mass???
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: Center of mass??? [message #17757 is a reply to message #17710] Thu, 11 November 1999 00:00 Go to previous messageGo to previous message
Anders Wennerberg is currently offline  Anders Wennerberg
Messages: 3
Registered: November 1999
Junior Member
Thanks for the help!
Yours
Anders
David Fanning wrote:

> Paul Hick (pphick@ucsd.edu) writes:
>
>> Reasoning by analogy to the 2D case, this should work, I think:
>>
>> xcm = Total( Total(Total(array,3),2) * Indgen(s[0])) / totalMass
>> ycm = Total( Total(Total(array,3),1) * Indgen(s[1])) / totalMass
>> zcm = Total( Total(Total(array,2),1) * Indgen(s[2])) / totalMass
>
> Well, it seems to work in the simple-minded cases I
> tried it on. :-)
>
> I'll write it up in an article if no one else has
> serious objections.
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Fanning Software Consulting
> Phone: 970-221-0438 E-Mail: davidf@dfanning.com
> Coyote's Guide to IDL Programming: http://www.dfanning.com/
> Toll-Free IDL Book Orders: 1-888-461-0155

--
B _________________________________________________________
| Anders Wennerberg, PhD, MD The normal disclaimer... .->-.
/o_ Karolinska Hospital & Institutet Tel: +46 (0)8 51772836 `-<-'
| _)Dept of Clinicl Neuroscience Fax: +46 (0)8 339953
\o Clinical Neurophysiology E-mail: anders@mrc.ks.se Transmitted on
| SE-171 76 STOCKHOLM 100% recycled
B Sweden electrons
"Var redo" "Alltid redo"
"Be prepared" "Always prepared"
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Object Widgets
Next Topic: Re: where() and IEEE NaN

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

Current Time: Fri Oct 10 11:18:24 PDT 2025

Total time taken to generate the page: 1.92022 seconds