RATS 11
RATS 11

Instructions /

CPRINT Instruction

Home Page

← Previous Next →

CPRINT( options )  start end cseries_list

Prints (displays) complex series

Parameters

   

start, end

range to print. By default, the range required to display all defined entries of the series printed.

cseries_list

list of complex series to display. If you omit the list, RATS prints all of the complex series stored in memory.

Description

CPRINT prints each entry as a pair of real numbers, the real and imaginary parts respectively. It prints the series in blocks, with two or three to a block, until the list is exhausted. See the sample output.

Options

INTERVAL=sampling interval [1]

You can use the INTERVAL option to reduce the number of frequencies printed. CPRINT prints just one entry out of each sampling interval, beginning with start. Because spectral estimates are usually quite smooth, you will lose very little detail while reducing rather considerably the size of the output.

 

LC=[ENTRIES]/PERIODS/FREQUENCIES

LC (Left Column) indicates how you want to label the entries. CPRINT assumes entry one is frequency zero when it computes the PERIODS and FREQUENCIES.

 

LENGTH=base number of ordinates (for LC=PERIODS or FREQUENCIES)

Sets the number of ordinates upon which the frequencies are based for computing the left column labeling. The base number should be the Fourier transform length if you haven't already reduced the frequency count using CSAMPLE, or the transform length divided by the sample rate if you did use CSAMPLE.

 

NUMBER=number assigned to first entry printed(for LC=ENTRIES) [first entry number]

If you use NUMBER, CPRINT labels the first entry it prints with the indicated number, and then numbers the other entries successively.

 

PICTURE="picture style formatting string"

This allows you to provide a picture code to control the formatting of the output. The same picture code applies to both the real and imaginary parts.

 

WINDOW="title for window"

If you use the WINDOW option, the output is displayed in a (read-only) spreadsheet window. The series will be in columns, with labels across the top row. You can export the contents of this window to various file formats using File–Export....

Examples

cprint(length=nords,lc=freq)  1 (nords+1)/2 9 10

 

This prints series 9 and 10 labeling the entries by their frequencies. The LENGTH option is used because the number of frequencies printed  is different from the number that should be used in calculating the frequencies.



cprint(len=nords,lc=periods,picture="##.####") 1 (nords+1)/2 9 10

 

Same as the previous, but with entries labeled by period, and with a picture code limiting the display to four digits to the right of the decimal.

Sample Output

These are (the start of) the two examples in order:

 

     ENTRY              Coherence                  Phase

   0.000000   ( 0.35994636, 0.00000000) ( 0.00000000, 0.00000000)

   0.024544   ( 0.43946027, 0.00000000) (-0.04697897, 0.00000000)

   0.049087   ( 0.41950483, 0.00000000) (-0.04881498, 0.00000000)

   0.073631   ( 0.64649333, 0.00000000) (-0.52006011, 0.00000000)

   0.098175   ( 0.63584895, 0.00000000) (-0.60448278, 0.00000000)

   0.122718   ( 0.68622671, 0.00000000) (-0.63831181, 0.00000000)

   0.147262   ( 0.67584188, 0.00000000) (-0.67282855, 0.00000000)

 etc.


 


 

ENTRY          Coherence          Phase

  Infinite    ( 0.3599, 0.0000) ( 0.0000, 0.0000)

   256.0000   ( 0.4395, 0.0000) (-0.0470, 0.0000)

   128.0000   ( 0.4195, 0.0000) (-0.0488, 0.0000)

    85.3333   ( 0.6465, 0.0000) (-0.5201, 0.0000)

    64.0000   ( 0.6358, 0.0000) (-0.6045, 0.0000)

    51.2000   ( 0.6862, 0.0000) (-0.6383, 0.0000)

    42.6667   ( 0.6758, 0.0000) (-0.6728, 0.0000)


 


Copyright © 2025 Thomas A. Doan