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

Home » Public Forums » archive » Re: SHIFT Function
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: SHIFT Function [message #79431 is a reply to message #79428] Tue, 28 February 2012 10:00 Go to previous message
Yngvar Larsen is currently offline  Yngvar Larsen
Messages: 134
Registered: January 2010
Senior Member
On Feb 28, 8:05 am, zolile mtumela <zolilemtum...@gmail.com> wrote:
> I  got centre frequency(freq_centre=2.35e-3),
> From the data,  period (T=20), number of elements( Ny=360), data for
> 2hours.
> freq_centre = 2.35e-3
> Freqc=(freq_centre/(1/(Ny*T)))
> print,freqc
[...]
> On calculating Freqc , I supposed to get around 17 but on the program
> its print infinite ,

My guess is that you are doing integer division in the denominator.

IDL> T = 20
IDL> Ny = 360
IDL> print, 1/(Ny*T)
0
IDL> freq_centre = 2.35e-3
IDL> print, freq_centre/(1/(Ny*T))
Inf
% Program caused arithmetic error: Floating divide by 0
IDL> print, freq_centre/(1./(Ny*T))
16.9200

--
Yngvar
[Message index]
 
Read Message
Read Message
Previous Topic: Integer least square
Next Topic: Last Days of Coyote Book Sale!

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

Current Time: Wed Dec 03 00:40:27 PST 2025

Total time taken to generate the page: 0.00205 seconds