home *** CD-ROM | disk | FTP | other *** search
- ; This batch file creates a plot of the real and imaginary parts
- ; of the simulated signal used in the example from Chapter 13,
- ; "Signal Processing", of _Using IDL_.
-
- @sigprc01.bat ; compute time data sequence u
-
- V = FFT(U) ; compute spectrum v
-
- M = (INDGEN(N)-(N/2-1)) ; m = [-(N/2-1), ... , -1, 0, 1, ... , N/2-1, N/2]
-
- F = M / (N*delt) ; frequencies corresponding to m in cycles/second
-
- !P.MULTI = [0, 1, 2] ; set up for two plots in window
-
- PLOT, F, FLOAT(SHIFT(V,N/2-1)), $
- YTITLE='real part of spectrum', $
- XTITLE='Frequency in cycles / second', $
- XRANGE=[-1,1]/(2*delt), XSTYLE=1, $
- TITLE='Spectrum of u(k)'
-
- PLOT, F, IMAGINARY(SHIFT(V,N/2-1)), $
- YTITLE='imaginary part of spectrum', $
- XTITLE='Frequency in cycles / second', $
- XRANGE=[-1,1]/(2*delt), XSTYLE=1
-
- !P.MULTI = 0
-
-