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

Home » Public Forums » archive » Re: Inconsistent Mean Calculation
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: Inconsistent Mean Calculation [message #30836 is a reply to message #30828] Mon, 20 May 2002 18:00 Go to previous messageGo to previous message
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
"Phil" <plmcelwee@yahoo.com> wrote in message
news:a3589d11.0205201557.1a92499f@posting.google.com...
> I have 5000 frames of video in a NetCDF file, and I want to
> calculate the average of frame 2557. I have read the video file
> into both IDL v5.1 and Matlab v6.1. Additionally I have extracted
> frame 2557 and copied it into Excel. Here are the mean calculations
> I get for this frame:
>
> Matlab: 4092.6805
> Excel: 4092.6805
> IDL: 4093.6165
>
> Can anyone offer any suggestions as to why the IDL calculation is
> different?

Matlab uses double-precision real numbers whereas IDL by default uses
single-precision. Try repeating your IDL calculations using
double precision (for example, if you are using IDL's TOTAL function,
set its DOUBLE keyword).

--
Mark Hadfield "Ka puwaha et tai nei, Hoea tatou"
m.hadfield@niwa.co.nz
National Institute for Water and Atmospheric Research (NIWA)


>
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: Is there no NULL in IDL??
Next Topic: Re: "bootstrap" statistics

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

Current Time: Wed Oct 08 13:19:17 PDT 2025

Total time taken to generate the page: 0.00468 seconds