From: glen herrmannsfeldt on 18 Jan 2010 04:08 Greg Heath <heath(a)alumni.brown.edu> wrote: (snip) > If the phase is obtained via the ratio y/x via atan2(y,x), the > principal value > is defined over the half closed interval (-pi,pi]. > http://en.wikipedia.org/wiki/Atan2 According to the current Fortran standard, it is the closed interval [-pi,pi], assuming the processor has a negative zero. Very strange, but that is what they did. -- glen
From: Clay on 18 Jan 2010 12:06 On Jan 18, 4:08 am, glen herrmannsfeldt <g...(a)ugcs.caltech.edu> wrote: > Greg Heath <he...(a)alumni.brown.edu> wrote: > > (snip) > > > If the phase is obtained via the ratio y/x via atan2(y,x), the > > principal value > > is defined over the half closed interval (-pi,pi]. > >http://en.wikipedia.org/wiki/Atan2 > > According to the current Fortran standard, it is the > closed interval [-pi,pi], assuming the processor has > a negative zero. > > Very strange, but that is what they did. > > -- glen There is probably a good story in there! Perhaps they were trying to maintain capatibility with something from before. Clay
From: Nasser M. Abbasi on 19 Jan 2010 03:17
I just realized something. For a real signal x(t), isn't the magnitude spectrum an even function and the phase spectrum an odd function? Since sinc(t) is a real function, the book is really correct as it shows the phase spectrum as an odd function. --Nasser "Nasser M. Abbasi" <nma(a)12000.org> wrote in message news:hiuqh3$kfv$1(a)speranza.aioe.org... >I am a little confused by the phase diagram of the sinc function outside >the main loop. > > I wrote a small demo program where I plot the magnitude spectrum and the > phase spectrum of the sinc function. I used Mathematica Arg[] function for > the phase diagram. > > For the main loop, the phase is zero. Then the phase alternates between Pi > and 0 over the remaining smaller loops. > > But I just looked at this text book I have by Stein and Jones, called > "Modern communication principles", where the book shows the phase outside > the main loop to fluctuate between +- Pi and 0. > > I have scanned the page in question, here it is > > http://12000.org/tmp/phase_sinc/book.png > > (the diagram is at the lower right edge of the above pic). > > Compare the above to what I get, which you can see by clicking on the > screen shot of my program which is the first one listed of this page below > http://12000.org/my_notes/mma_demos/index.htm > > (ps. if you have the free Mathematica player, you could run the above > program also) > > Also, the phase diagram I have agrees with this web page I just saw at > dsprleated: > > http://www.dsprelated.com/dspbooks/sasp/Rectangular_Window.html > > (scroll down to figure 1.10 near the middle of the above page to see the > sinc phase diagram). > > So, my question is, which phase diagram do you think is correct? Is it > possible that the book is wrong? > > thanks > --Nasser > > |