section c of routines in global.i

yorick banner

Home

Manual

Packages

Global Index

Keywords

Quick Reference

all functions - c

 
 
 
c_adjust


             c_adjust, c, mesh  
          or c_adjust, c, mesh, 1  
          or c= c_adjust(c, mesh, how)  
 
     adjust the cell number array C returned by track_reduce to  
     allow for a different layout of cell arrays than the one assumed  
     by the tracking routines.  Two HOW values are currently  
     supported: 0 (or nil) if the cell arrays are the same shape as  
     the nodal arrays, but the non-existent cell is at the end of  
     each row rather than at the beginning.  And 1 if the cell arrays  
     are smaller by one along each dimension than the nodal arrays.  
     If you call c_adjust as a subroutine, the input C array  
     is modified; if you call it as a function, the input C is  
     unchanged and the new values returned.  

interpreted function, defined at i0/hex.i   line 223  
SEE ALSO: track_reduce,   hex5_track,   cs_adjust  
 
 
 
cage3


             cage3  
          or cage3, onoff  
 
     Toggle the cage display.  If ONOFF is non-nil and non-zero,  
     turn on the cage.  If ONOFF is zero, turn off the cage.  
     The cage draws a rectangular box "behind" the 3D object and  
     attempts to put ticks and labels around the edge of the box.  

interpreted function, defined at i/pl3d.i   line 982  
SEE ALSO: limit3,   plwf,   plwf  
 
 
 
call


             call, subroutine(arg1, arg2, arg3, arg4, arg5  
                              arg6, arg7, arg8);  
 
     allows a SUBROUTINE to be called with a very long argument list  
     as an alternative to:  
          subroutine, arg1, arg2, arg3, arg4, arg5,  
            arg6, arg7, arg8;  
     Note that the statement  
          subroutine(arg1, arg2, arg3, arg4, arg5,  
                     arg6, arg7, arg8);  
     will print the return value of subroutine, even if it is nil.  
     If invoked as a function, call simply returns its argument.  

interpreted function, defined at i0/std.i   line 2793  
 
 
 
catch


             catch(category)  
 
     Catch errors of the specified category.  Category may be -1 to  
     catch all errors, or a bitwise or of the following bits:  
        0x01 math errors (SIGFPE, math library)  
	0x02 I/O errors  
	0x04 keyboard interrupts (e.g.- control C interrupt)  
	0x08 other compiled errors (YError)  
	0x10 interpreted errors (error)  
     Use catch by placing it in a function before the section of code  
     in which you are trying to catch errors.  When catch is called,  
     it always returns 0, but it records the virtual machine program  
     counter where it was called, and longjumps there if an error is  
     detected.  The most recent matching call to catch will catch the  
     error.  Returning from the function in which catch was called  
     pops that call off the list of catches the interpreter checks.  
     To use catch, place the call near the top of a function:  
        if (catch(category)) {  
	  ......  
	}  
        ......  
     If an error with the specified category occurs in the "protected"  
     code, the program jumps back to the point of the catch and acts  
     as if the catch function had returned 1 (remember that when catch  
     is actually called it always returns 0).  
     In order to lessen the chances of infinite loops, the catch is  
     popped off the active list if it is actually used, so that a  
     second error will *not* be caught.  Often, this is only desirable  
     for the error handling code itself -- if you want to re-execute  
     the "protected" code, do this, and take care of the possibility  
     of infinite loops in your interpreted code:  
        while (catch(category)) {  
	  ......  
	}  
        ......  
     After an error has been caught, the associated error message  
     (what would have been printed had it not been caught) is left  
     in the variable catch_message.  

builtin function, documented at i0/std.i   line 2548  
SEE ALSO: error  
 
 
 
cauer


             cauer(np, ripple, atten, w)  
          or cauer(np, ripple, atten, w, wc, db)  
 
     return frequency response (amplitude) for Cauer filter;  
     the parameters are the same as for fil_cauer.  

interpreted function, defined at i/filter.i   line 631  
SEE ALSO: fil_cauer  
 
 
 
cd


             cd, directory_name  
          or cd(directory_name)  
 
     change current working directory to DIRECTORY_NAME, returning  
     the expanded path name (i.e.- with leading environment variables,  
     ., .., or ~ replaced by the actual pathname).  If called as a  
     function, returns nil to indicate failure, otherwise failure  
     causes a Yorick error.  

builtin function, documented at i0/std.i   line 1546  
SEE ALSO: lsdir,   mkdir,   rmdir,   get_cwd,   get_home,  
get_env,   get_argv  
 
 
 
ceil


             ceil(x)  
 
     returns the smallest integer not less than x (no-op on integers).  

builtin function, documented at i0/std.i   line 618  
SEE ALSO: floor  
 
 
 
cheby1


             cheby1(np, ripple, w)  
          or cheby1(np, ripple, w, wc, db)  
 
     return frequency response (amplitude) for Chebyshev filter;  
     the parameters are the same as for fil_cheby1.  

interpreted function, defined at i/filter.i   line 580  
SEE ALSO: fil_cheby1  
 
 
 
cheby2


             cheby2(np, atten, w)  
          or cheby2(np, atten, w, wc, db)  
 
     return frequency response (amplitude) for inverse Chebyshev filter;  
     the parameters are the same as for fil_cheby2.  

interpreted function, defined at i/filter.i   line 605  
SEE ALSO: fil_cheby2  
 
 
 
cheby_deriv


             cheby_deriv(fit)  
 
    returns Chebyshev fit to the derivative of the function of the  
    input Chebyshev FIT.  
    

interpreted function, defined at i/cheby.i   line 76  
SEE ALSO: cheby_fit,   cheby_integ  
 
 
 
cheby_eval


             cheby_eval(fit, x)  
 
    evaluates the Chebyshev fit (from cheby_fit) at points X.  
    the return values have the same dimensions as X.  
    

interpreted function, defined at i/cheby.i   line 36  
SEE ALSO: cheby_fit  
 
 
 
cheby_fit


             fit = cheby_fit(f, interval, n)  
         or fit = cheby_fit(f, x, n)  
 
    returns the Chebyshev fit (for use in cheby_eval) of degree N  
    to the function F on the INTERVAL (a 2 element array [a,b]).  
    In the second form, F and X are arrays; the function to be  
    fit is the piecewise linear function of xp interp(f,x,xp), and  
    the interval of the fit is [min(x),max(x)].  
    
    The return value is the array [a,b, c0,c1,c2,...cN] where [a,b]  
    is the interval over which the fit applies, and the ci are the  
    Chebyshev coefficients.  It may be useful to use a relatively  
    large value of N in the call to cheby_fit, then to truncate the  
    resulting fit to fit(1:3+m) before calling cheby_eval.  
    

interpreted function, defined at i/cheby.i   line 7  
SEE ALSO: cheby_eval,   cheby_integ,   cheby_deriv  
 
 
 
cheby_integ


             cheby_integ(fit)  
         or cheby_integ(fit, x0)  
 
    returns Chebyshev fit to the integral of the function of the  
    input Chebyshev FIT.  If X0 is given, the returned integral will  
    be zero at X0 (which should be inside the fit interval fit(1:2)),  
    otherwise the integral will be zero at x=fit(1).  
    

interpreted function, defined at i/cheby.i   line 54  
SEE ALSO: cheby_fit,   cheby_deriv  
 
 
 
check_makefile


 check_makefile  
 
  

interpreted function, defined at i/make.i   line 120  
 
 
 
clear3


             clear3  
 
     Clear the current 3D display list.  

interpreted function, defined at i/pl3d.i   line 714  
 
 
 
close


             close, f  
 
     closes the I/O stream F (returned earlier by the open function).  
     If F is a simple variable reference (as opposed to an expression),  
     the close function will set F to nil.  If F is the only reference  
     to the I/O stream, then "close, f" is equivalent to "f= []".  
     Otherwise, "close, f" will close the file (so that subsequent  
     I/O operations will fail) and print a warning message about the  
     outstanding ("stale") references.  

builtin function, documented at i0/std.i   line 1221  
SEE ALSO: open,   read,   write,   rdline,   bookmark,   backup,  
save,   restore,   rename,   remove  
 
 
 
collect


             result= collect(f, name_string)  
 
     scans through all records of the history file F accumulating the  
     variable NAME_STRING into a single array with one additional  
     index varying from 1 to the number of records.  
     NAME_STRING can be either a simple variable name, or a name  
     followed by up to four simple indices which are either nil, an  
     integer, or an index range with constant limits.  (Note that  
     0 or negative indices count from the end of a dimension.)  
     Examples:  
        collect(f, "xle")        -- collects the variable f.xle  
	collect(f, "tr(2,2:)")   -- collects f.tr(2,2:)  
	collect(f, "akap(2,-1:0,)") -- collects f.akap(2,-1:0,)  
	             (i.e.- akap in the last two values of its  
		            second index)  

interpreted function, defined at i0/std.i   line 1714  
SEE ALSO: get_times  
 
 
 
color_bar


             color_bar  
          or color_bar, levs, colors  
 
     Draw a color bar below the current coordinate system.  If LEVS is  
     not specified uses plfc_levs (set by previous call to plfc).  If  
     COLORS is specified, it should have one more value than LEVS,  
     otherwise equally spaced colors are chosen, or plfc_colors if  
     plfc_levs was used.  With the vert=1 keyword the color bar appears  
     to the left of the current coordinate system (vert=0 is default).  
     By default, color_bar will attempt to label some of the color  
     interfaces.  With the labs= keyword, you can force the labelling  
     algorithm as follows: labs=0 supresses all labels, labs=n forces  
     a label at every nth interface, labs=[i,n] forces a label at every  
     nth interface starting from interface i (0<=i<=numberof(LEVS)).  
     You can use the adjust= keyword to move the bar closer to (adjust<0)  
     or further from (adjust>0) the viewport, and the height= keyword to  
     set the height of any labels (default 14 points).  

interpreted function, defined at i0/graph.i   line 1648  
SEE ALSO: plfc  
 
 
 
conj


             conj(z)  
 
     returns the complex conjugate of its argument.  

builtin function, documented at i0/std.i   line 646  
 
 
 
contour


             nc= contour(yc,xc, level, z, y,x)  
          or nc= contour(yc,xc, level, z, y,x,ireg)  
 
     returns the points on the contour curve that would have been  
     plotted by plc.  Z, Y, X, and IREG are as for plc, and the  
     triangle= and region= keywords are accepted and have the same  
     meaning as for plc.  Unlike plc, the triangle array is an output  
     as well as an input to contour; if supplied it may be modified  
     to reflect any triangulations which were performed by contour.  
     LEVEL is a scalar z value to return the points at that contour  
     level.  All such points lie on edges of the mesh.  If a contour  
     curve closes, the final point is the same as the initial point  
     (i.e.- that point is included twice in the returned list).  
     LEVEL is a pair of z values [z0,z1] to return the points of  
     a set of polygons which outline the regions between the two  
     contour levels.  These will include points on the mesh boundary  
     which lie between the levels, in addition to the edge points  
     for both levels.  The polygons are closed, simply connected,  
     and will not contain more than about 4000 points (larger polygons  
     are split into pieces with a few points repeated where the pieces  
     join).  
     YC and XC are the output points on the curve(s), or nil if there  
     are no points.  On input, they must be simple variable references,  
     not expressions.  The return value NC is a list of the lengths of  
     the polygons/polylines returned in (XC,YC), or nil if there are  
     none.  numberof(XC)==numberof(YC)==sum(NC).  For the level pair  
     case, YC, XC, and NC are ready to be used as inputs to plfp.  
   KEYWORDS: triangle, region  

builtin function, documented at i0/graph.i   line 392  
SEE ALSO: plc,   plfp  
 
 
 
conv3_rays


             conv3_rays(rays)  
 
     convert [p,q] representation to or from best_rays representation.  
     If the first dimension of RAYS is 3, returns 5-by-raydims array  
     of best_rays; if first dimension of RAYS is 5, returns 3-by-raydims-  
     by-2 [p,q] for use with hex5_track.  

interpreted function, defined at i0/hex.i   line 121  
SEE ALSO: hex5_track,   pic3_rays,   best_rays  
 
 
 
convol


             convol(a,b)  
 
     returns convolution of vector a with vector b, a vector  
     of length na+nb-1 where na=numberof(a), nb=numberof(b).  
     In detail, for i=[1 to na+nb-1]  
       result(i) = sum j=[max(1,1+i-nb) to min(na,i)] (a(j)*b(1+i-j))  
     The n0= and n1= keywords can be used to control the section of  
     the full array that is actually returned, 1<=n0 line 6  
SEE ALSO: fft_good,   fft  
 
 
 
convol_check


 convol_check  
 
  

interpreted function, defined at i/convol.i   line 64  
 
 
 
copyb


             copyb, src, dst  
          or copyb, openb(src_name), createb(dst_name)  
 
     Copy binary file SRC to binary file DST.  
     Check for "obsolete/" subdirectory of Yorick home directory for  
     extensions of the openb function to old file formats.  
     Use the size= keyword to specify a non-default (4 Mbyte) size for  
     the members of the output file family.  
     If you habitually include basfix.i, you may want to use the  
     basfix_openb function to open the src file.  

interpreted function, defined at i/copyb.i   line 10  
SEE ALSO: openb,   createb,   open102,   close102  
 
 
 
cos


 cos  
 
builtin function, documented at i0/std.i   line 518  
SEE sin  
 
 
 
cosh


 cosh  
 
builtin function, documented at i0/std.i   line 557  
SEE sinh  
 
 
 
cray_primitives


             cray_primitives, file  
 
     sets FILE primitive data types to be native to Cray 1, XMP, and YMP.  

interpreted function, defined at i0/std.i   line 2003  
 
 
 
create


             f= create(filename)  
 
     is a synonym for       f= open(filename, "w")  
     Creates a new text file FILENAME, destroying any existing file of  
     that name.  Use the write function to write into the file F.  

interpreted function, defined at i0/std.i   line 1212  
SEE ALSO: write,   close,   open  
 
 
 
createb


             file= createb(filename)  
          or file= createb(filename, primitives)  
 
     creates FILENAME as a PDB file in "w+b" mode, destroying any  
     existing file by that name.  If the PRIMITIVES argument is  
     supplied, it must be the name of a procedure that sets the  
     primitive data types for the file.  The default is to create  
     a file with the native primitive types of the machine on which  
     Yorick is running.  The following PRIMITIVES functions are  
     predefined:  
        sun_primitives    -- appropriate for Sun, HP, IBM, and  
	                     most other workstations  
        sun3_primitives   -- appropriate for old Sun-2 or Sun-3  
        dec_primitives    -- appropriate for DEC (MIPS) workstations, Windows  
        alpha_primitives  -- appropriate for DEC alpha workstations  
        sgi64_primitives  -- appropriate for 64 bit SGI workstations  
        cray_primitives   -- appropriate for Cray 1, XMP, and YMP  
	mac_primitives    -- appropriate for MacIntosh  
	macl_primitives   -- appropriate for MacIntosh, 12-byte double  
	i86_primitives    -- appropriate for Linux i86 machines  
	pc_primitives     -- appropriate for IBM PC  
        vax_primitives    -- appropriate for VAXen only (H doubles)  
        vaxg_primitives   -- appropriate for VAXen only (G doubles)  
        xdr_primitives    -- appropriate for XDR files  

interpreted function, defined at i0/std.i   line 1925  
SEE ALSO: openb,   updateb,   cd,   save,   add_record,  
set_filesize,   set_blocksize,   close102,  
close102_default,   at_pdb_open,   at_pdb_close  
 
 
 
cs_adjust


             nlist= cs_adjust(nlist, c, s, ireg)  
 
     adjust NLIST, C, S returned from track_reduce to remove transits  
     of cells for which IREG == 0.  Can be called before or after  
     c_adjust, depending on layout of IREG.  

interpreted function, defined at i0/hex.i   line 265  
SEE ALSO: c_adjust  
 
 
 
csch


 csch  
 
interpreted function, defined at i0/std.i   line 567  
SEE sech  
 
 
 
current_window


             n= current_window()  
 
     returns the number of the current graphics window, or -1 if none.  

builtin function, documented at i0/graph.i   line 106