next up previous contents
Next: Function: audio() Up: GRASP Routines: General purpose Previous: Function: graph_short()   Contents

Function: sgraph()

0 sgraph(short *array,int n,char *name,int filenumber)

This routine writes the elements of a short array into a file so that they may be viewed later with a graphing program like xmgr.

The arguments are:

array: Input. The array that you want to graph.
n: Input. The number of array elements that you want to graph. The elements used are array[0..n-1].
name: Input. Used to construct the output file name.
filenumber: Input. The value of $y$ used to construct the output file name.

This function produces an output file with two columns, containing:
0 $\qquad$ array[0]
1 $\qquad$ array[1]
n-1 $\qquad$ array[n-1]
The name of this file is: name.$y$ where $y$ is the integer specified by filenumber. Note that if $y<1000$ then $y$ is ``expanded" or ``padded" to three digits. For example, calling
will produce the file
containing $1024$ lines.

Authors: Bruce Allen,
Comments: None.

Bruce Allen 2000-11-19