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 #30828] Tue, 21 May 2002 10:39 Go to previous message
plmcelwee is currently offline  plmcelwee
Messages: 6
Registered: April 2002
Junior Member
"Mark Hadfield" <m.hadfield@niwa.co.nz> wrote in message news:<accajn$q28$1@newsreader.mailgate.org>...
> "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 and Ken, thanks for the help! Using double precision I get

IDL: 4092.6804

This is certainly close enough for what I'm doing.
[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 11:22:15 PDT 2025

Total time taken to generate the page: 0.00428 seconds