1001
The Ch Language Environment Version 6.1 Reference Guide -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 2 3 4 5 6 7 8 9 10 Bessel functions t j0(t) j1(t) j2(t) j3(t)

Ch Ref

Embed Size (px)

DESCRIPTION

Reference Guide

Citation preview

  • The Ch Language EnvironmentVersion 6.1

    Reference Guide

    -0.6

    -0.4

    -0.2

    0

    0.2

    0.4

    0.6

    0.8

    1 2 3 4 5 6 7 8 9 10

    Bes

    sel f

    unct

    ions

    t

    j0(t)j1(t)j2(t)j3(t)

  • How to Contact SoftIntegration

    Mail SoftIntegration, Inc.216 F Street, #68Davis, CA 95616

    Phone + 1 530 297 7398Fax + 1 530 297 7392Web http://www.softintegration.comEmail [email protected]

    Copyright c2001-2008 by SoftIntegration, Inc. All rights reserved.Revision 6.1.0, September 2008

    Permission is granted for registered users to make one copy for their own personal use. Further reproduction,or any copying of machine-readable files (including this one) to any server computer, is strictly prohibited.

    SoftIntegration, Inc. is the holder of the copyright to the Ch language environment described in this docu-ment, including without limitation such aspects of the system as its code, structure, sequence, organization,programming language, header files, function and command files, object modules, static and dynamic loadedlibraries of object modules, compilation of command and library names, interface with other languages andobject modules of static and dynamic libraries. Use of the system unless pursuant to the terms of a licensegranted by SoftIntegration or as otherwise authorized by law is an infringement of the copyright.

    SoftIntegration, Inc. makes no representations, expressed or implied, with respect to this documenta-tion, or the software it describes, including without limitations, any implied warranty merchantabilityor fitness for a particular purpose, all of which are expressly disclaimed. Users should be aware thatincluded in the terms and conditions under which SoftIntegration is willing to license the Ch lan-guage environment as a provision that SoftIntegration, and their distribution licensees, distributorsand dealers shall in no event be liable for any indirect, incidental or consequential damages in con-nection with, or arising out of, the furnishing, performance, or use of the Ch language environment,and that liability for direct damages shall be limited to the amount of purchase price paid for the Chlanguage environment.

    In addition to the foregoing, users should recognize that all complex software systems and their doc-umentation contain errors and omissions. SoftIntegration shall not be responsible under any circum-stances for providing information on or corrections to errors and omissions discovered at any time inthis documentation or the software it describes, even if SoftIntegration has been advised of the errorsor omissions. The Ch language environment is not designed or licensed for use in the on-line controlof aircraft, air traffic, or navigation or aircraft communications; or for use in the design, construction,operation or maintenance of any nuclear facility.

    Ch, ChIDE, SoftIntegration, and One Language for All are either registered trademarks or trademarks ofSoftIntegration, Inc. in the United States and/or other countries. Microsoft, MS-DOS, Windows, Windows95, Windows 98, Windows Me, Windows NT, Windows 2000, and Windows XP are trademarks of MicrosoftCorporation. Solaris and Sun are trademarks of Sun Microsystems, Inc. Unix is a trademark of the OpenGroup. HP-UX is either a registered trademark or a trademark of Hewlett-Packard Co. Linux is a trademarkof Linus Torvalds. Mac OS X and Darwin are trademarks of Apple Computers, Inc. QNX is a trademark ofQNX Software Systems. All other trademarks belong to their respective holders.

    i

  • Preface

    Ch is a C compatible cross-platform scripting language environment. Ch is also a C virtual machine and asuperset of C interpreter with salient features from C++, other languages, and software packages. Descrip-tions of functions and classes of Ch are given in this reference guide. The header files in the distribution ofthe Ch language environment are listed in Table 1. Functions not explained in this reference manual followthe interpretation of ISO and de facto standards such as ISO C and POSIX standards.

    Typographical Conventions

    The following list defines and illustrates typographical conventions used as visual cues for specific elementsof the text throughout this document.

    Interface components are window titles, button and icon names, menu names and selections, andother options that appear on the monitor screen or display. They are presented in boldface. A sequenceof pointing and clicking with the mouse is presented by a sequence of boldface words.

    Example: Click OK

    Example: The sequence Start->Programs->Ch6.1->Ch indicates that you first select Start. Thenselect submenu Programs by pointing the mouse on Programs, followed by Ch6.1. Finally, selectCh.

    Keycaps, the labeling that appears on the keys of a keyboard, are enclosed in angle brackets. The labelof a keycap is presented in typewriter-like typeface.

    Example: Press

    Key combination is a series of keys to be pressed simultaneously (unless otherwise indicated) toperform a single function. The label of the keycaps is presented in typewriter-like typeface.

    Example: Press

    Commands presented in lowercase boldface are for reference only and are not intended to be typedat that particular point in the discussion.

    Example: Use the install command to install...

    In contrast, commands presented in the typewriter-like typeface are intended to be typed as part of aninstruction.

    Example: Type install to install the software in the current directory.

    Command Syntax lines consist of a command and all its possible parameters. Commands are dis-played in lowercase bold; variable parameters (those for which you substitute a value) are displayed

    ii

  • Table 1: Library summary.

    Header file Description C POSIX Chaio.h Asynchronous input and output X Xarpa/inet.h Internet operations Xarray.h Computational arrays Xassert.h Diagnostics X X Xchplot.h 2D and 3D plotting Xchshell.h Ch Shell functions Xcomplex.h Complex numbers X Xcpio.h Cpio archive values Xcrypt.h Encryption functions Xctype.h Character handling X X Xdirent.h Format of directory entries X Xdlfcn.h Dynamically loaded functions Xerrno.h Error numbers X X Xfcntl.h Interprocess communication functions X Xfenv.h Floating-point environment X Xfloat.h platform-dependent floating-point limits X X Xglob.h Pathname pattern-matching types Xgrp.h Group structure X Xinttypes.h Fixed size integral types X Xiostream.h input and output stream in C++ style Xiso646.h Alternative spellings X Xlibintl.h Message catalogs for internationalization Xlimits.h platform-dependent integral limits X X Xlocale.h Locale functions X X Xmalloc.h Dynamic memory management functions Xmath.h Mathematical functions X X Xmqueue.h Message queues X Xnetconfig.h Network configuration database Xnetdb.h Network database operations Xnetdir.h Name-to-address mapping for transport protocols Xnetinet/in.h Internet Protocol family Xnew.h Memory allocation error handling in C++ style Xnumeric.h Numerical analysis Xpoll.h Definitions for the poll() function Xpthread.h Threads Xpwd.h Password structure X Xre comp.h regular-expression-matching functions for re comp() Xreadline.h Readline function Xregex.h regular-expression-matching types Xsched.h execution scheduling X Xsemaphore.h Semaphore functions X Xsetjmp.h Non-local jumps X X X

    iii

  • Table 1: Library summary (continued).

    Header file Description C POSIX Chsignal.h Signal handling X X Xstdarg.h Variable argument lists X X Xstdbool.h Boolean numbers X Xstddef.h Miscellaneous functions and macros X X Xstdint.h Integer types X X Xstdio.h Input and output X X Xstdlib.h Utility functions X X Xstring.h String functions X X Xstropts.h streams interface Xsys/acct.h Process accounting Xsys/fcntl.h Control file Xsys/file.h Accessing the file struct array Xsys/ioctl.h Control device Xsys/ipc.h Interprocess communication access structure Xsys/lock.h Locking processes Xsys/mman.h Memory management declarations X Xsys/msg.h Message queue structures Xsys/procset.h Set processes Xsys/resource.h XSI resource operations Xsys/sem.h Semaphore facility Xsys/shm.h Shared memory facility Xsys/socket.h Internet Protocol family Xsys/stat.h File structure function X Xsys/time.h Time types Xsys/times.h File access and modification times structure X Xsys/types.h Data types X Xsys/uio.h Vector I/O operations Xsys/un.h Unix-domain sockets Xsys/utsname.h System name structure X Xsys/wait.h Evaluating exit statuses X Xsyslog.h System error logging Xtar.h Extended tar definitions Xtermios.h Define values for termios X Xtgmath.h Type-generic mathematical functions X Xtime.h Time and date functions X X Xtiuser.h Transport layer interface Xunistd.h System and process functions X Xutime.h Access and modification times structure X Xwait.h Wait for child process to stop or terminate Xwchar.h Multibyte I/O and string functions X Xwctype.h Multibyte character class tests X X

    Note: the symbol X indicates that the library is supported by the standard.

    iv

  • in lowercase italics; constant parameters are displayed in lowercase bold. The brackets indicate itemsthat are optional.

    Example: ls [-aAbcCdfFgilLmnopqrRstux1] [file ...]

    Command lines consist of a command and may include one or more of the commands possibleparameters. Command lines are presented in the typewriter-like typeface.

    Example: ls /home/username

    Screen text is a text that appears on the screen of your display or external monitor. It can be a systemmessage, for example, or it can be a text that you are instructed to type as part of a command (referredto as a command line). Screen text is presented in the typewriter-like typeface.

    Example: The following message appears on your screen

    usage: rm [-fiRr] file ...

    ls [-aAbcCdfFgilLmnopqrRstux1] [file ... ]

    Function prototype consists of return type, function name, and arguments with data type and param-eters. Keywords of the Ch language, typedefed names, and function names are presented in boldface.Parameters of the function arguments are presented in italic. The brackets indicate items that areoptional.

    Example: double derivative(double (*func)(double), double x, ... [double *err, double h]);

    Source code of programs is presented in the typewriter-like typeface.Example: The program hello.ch with code

    int main() {printf("Hello, world!\n");

    }

    will produce the output Hello, world! on the screen.

    Variables are symbols for which you substitute a value. They are presented in italics.Example: module n (where n represents the memory module number)

    System Variables and System Filenames are presented in boldface.Example: startup file /home/username/.chrc or .chrc in directory /home/username in Unix andC:\ > chrc or chrc in directory C:\ > in Windows.

    Identifiers declared in a program are presented in typewriter-like typeface when they are used insidea text.

    Example: variable var is declared in the program.

    Directories are presented in typewriter-like typeface when they are used inside a text.Example: Ch is installed in the directory /usr/local/ch in Unix and C:/Ch in Windows.

    Environment Variables are the system level variables. They are presented in boldface.Example: Environment variable PATH contains the directory /usr/ch.

    v

  • Other Relevant Documentations

    The core Ch documentation set consists of the following titles. These documentation come with the CD andare installed in CHHOME/docs, where CHHOME is the Ch home directory.

    The Ch Language Environment Installation and System Administration Guide, version 6.1, SoftIn-tegration, Inc., 2008.

    This document covers system installation and configuration, as well as setup of Ch for Web servers.

    The Ch Language Environment, Users Guide, version 6.1, SoftIntegration, Inc., 2008.This document presents language features of Ch for various applications.

    The Ch Language Environment, Reference Guide, version 6.1, SoftIntegration, Inc., 2008.This document gives detailed references of functions, classes and commands along with sample sourcecode.

    The Ch Language Environment, SDK Users Guide, version 6.1, SoftIntegration, Inc., 2008.This document presents Software Development Kit for interfacing with C/C++ functions in static ordynamical libraries.

    The Ch Language Environment CGI Toolkit Users Guide, version 3.5, SoftIntegration, Inc., 2003.This document describes Common Gateway Interface in CGI classes with detailed references for eachmember function of the classes.

    vi

  • Table of Contents

    Preface i

    1 Diagnostic Test 1assert . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

    2 2D and 3D plotting 3CPlot Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

    arrow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9autoScale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13axis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14axisRange . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16axes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20barSize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22border . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22borderOffsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24boxBorder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26boxFill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26boxWidth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29changeViewAngle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30circle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32colorBox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34contourLabel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35contourLevels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38contourMode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40coordSystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47data2D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50data2DCurve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55data3D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56data3DCurve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63data3DSurface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65dataFile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67dataSetNum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71deleteData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72deletePlots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72dimension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73displayTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73

    vii

  • enhanceText . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75func2D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79func3D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80funcp2D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82funcp3D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83getLabel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85getOutputType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86getSubplot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87getTitle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91grid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91isUsed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94label . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95legend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96legendLocation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98legendOption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102lineType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104margins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108origin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109outputType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110plotType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120plotting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148pointType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150polarPlot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153polygon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155rectangle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158removeHiddenLine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160scaleType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162showMesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166size3D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167sizeRatio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169smooth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170subplot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173tics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173ticsDay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175ticsDirection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176ticsFormat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177ticsLabel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179ticsLevel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181ticsLocation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183ticsMirror . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185ticsMonth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186ticsPosition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187ticsRange . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188title . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189

    viii

  • fplotxy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191fplotxyz . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193plotxy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195plotxyf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201plotxyz . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203plotxyzf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208

    3 Shell Functions 211chinfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213iskey . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215isstudent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217isvar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218sizeofelement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219

    4 Complex Functions 221cabs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223cacos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224cacosh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225carg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226casin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227casinh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228catan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229catanh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230ccos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231ccosh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232cexp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233cimag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234clog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235conj . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236cpow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237creal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238csin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239csinh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240csqrt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241ctan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242ctanh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243iscnan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244

    5 Character Handling 245isalnum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246isalpha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247iscntrl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248isdigit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249isgraph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250islower . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251isprint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252ispunct . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253isspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254

    ix

  • isupper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255isxdigit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256tolower . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257toupper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258

    6 Errors 259

    7 Characteristics of floating types 260

    8 Sizes of integer types 263

    9 Localization 265localeconv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267setlocale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272

    10 Mathematics 274acos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277acosh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278asin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279asinh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280atan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281atan2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282atanh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284cbrt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285ceil . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286copysign . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287cos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288cosh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289erf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290erfc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291exp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292exp2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293expm1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294fabs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295fdim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296floor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297fma . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298fmax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299fmin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300fmod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301fpclassify . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302frexp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303hypot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304ilogb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305isfinite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306isgreater . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307isgreaterequal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308isinf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309

    x

  • isless . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310islessequal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311islessgreater . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312isnan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313isnormal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314isunordered . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315ldexp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316lgamma . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318log10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319log1p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320log2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321logb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322lrint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323lround . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324modf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325nan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326nearbyint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327nextafter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328nexttoward . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329pow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330remainder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331remquo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332rint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333round . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334scalbn and scalbln . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335signbit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336sin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337sinh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338sqrt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339tan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340tanh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341tgamma . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342trunc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343

    11 Numeric Analysis 344balance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348ccompanionmatrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351cdeterminant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352cdiagonal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354cdiagonalmatrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357cfevalarray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359cfunm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361charpolycoef . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363choldecomp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365cinverse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369clinsolve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371cmean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373

    xi

  • combination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375companionmatrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376complexsolve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377condnum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383conv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385conv2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390corrcoef . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393correlation2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395covariance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397cpolyeval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400cproduct . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402cross . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404csum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405ctrace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407ctriangularmatrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408cumprod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411cumsum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413curvefit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415deconv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419derivative . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422derivatives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424determinant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427diagonal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429diagonalmatrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 432difference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434dot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435eigen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436eigensystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441expm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442factorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444fevalarray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445fft . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452filter2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457findvalue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459fliplr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461flipud . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463fminimum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465fminimums . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 468fsolve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471funm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 474fzero . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476gcd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 478getnum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 480hessdecomp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481histogram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484householdermatrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487identitymatrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489

    xii

  • ifft . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 490integral1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 492integral2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495integral3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 497integration2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499integration3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 501interp1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504interp2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 506inverse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 509lcm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 511lindata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 512linsolve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 514linspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 516llsqcovsolve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 519llsqnonnegsolve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 521llsqsolve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 523logm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 526logdata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 528logspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 529ludecomp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 531maxloc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 535maxv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 536mean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 537median . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 540minloc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 542minv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 543norm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 544nullspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 548oderk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 551oderungekutta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 560odesolve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 562orthonormalbase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 564pinverse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 567polycoef . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 572polyder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 575polyder2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 577polyeval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 580polyevalarray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 582polyevalm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 584polyfit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 586product . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 590qrdecomp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 592qrdelete . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 598qrinsert . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 602rank . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 605rcondnum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 607residue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 609roots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 614

    xiii

  • rot90 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 616rsf2csf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 618schurdecomp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 621sign . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 624sort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 625specialmatrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 628

    Cauchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 628ChebyshevVandermonde . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 629Chow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 631Circul . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 632Clement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 633DenavitHartenberg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 634DenavitHartenberg2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 637Dramadah . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 638Fiedler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 640Frank . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 641Gear . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 642Hadamard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 643Hankel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 645Hilbert . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 646InverseHilbert . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 647Magic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 647Pascal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 649Rosser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 650Toeplitz . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 651Vandermonde . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 653Wilkinson . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 653

    sqrtm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 655std . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 657sum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 659svd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 661trace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 668triangularmatrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 670unwrap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 673urand . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 675xcorr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 676

    12 Non-local jumps 679setjmp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 681longjmp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 683

    13 Signal handling 684signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 686raise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 688

    xiv

  • 14 Variable Argument Lists 689arraycopy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 693va arg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 695va arraydim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 696va arrayextent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 697va arraynum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 698va arraytype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 699va copy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 701va count . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 703va datatype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 704va dim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 705va elementtype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 706va end . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 707va extent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 708va start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 709va tagname . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 711

    15 Boolean type and values 713

    16 Common Definitions 714

    17 Input/Output 716clearerr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 721fclose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 722feof . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 723ferror . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 724fflush . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 725fgetc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 726fgetpos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 727fgets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 728fopen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 729fprintf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 730fputc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 734fputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 735fread . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 736freopen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 737fscanf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 738fseek . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 741fsetpos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 743ftell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 744fwrite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 746getchar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 747getc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 748gets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 749perror . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 750printf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 752putchar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 753putc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 754

    xv

  • puts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 755remove . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 756rename . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 757rewind . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 759scanf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 760setbuf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 762setvbuf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 763snprintf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 764sprintf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 765sscanf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 766tmpfile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 767tmpnam . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 768ungetc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 769vfprintf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 771vprintf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 772vsnprintf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 773vsprintf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 774

    18 String Handling 775abort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 778abs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 779labs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 779llabs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 779atexit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 780atoc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 781atof . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 782atoi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 783atol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 783atoll . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 783bsearch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 784calloc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 786div . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 787exit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 788free . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 789getenv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 790iscnum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 791isenv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 792isnum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 793iswnum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 794malloc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 795mblen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 796mbstowcs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 797mbtowc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 799qsort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 801rand . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 803realloc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 804remenv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 806srand . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 807

    xvi

  • strtod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 808strtof . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 808strtold . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 808strtol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 810strtoll . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 810strtoul . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 810strtoull . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 810system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 812wcstombs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 813wctomb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 814

    19 String Functions 815memchr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 817memcmp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 818memcpy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 819memmove . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 820memset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 821str2ascii . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 822str2mat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 823stradd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 825strcasecmp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 826strcat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 827strchr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 828strcmp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 829strcoll . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 830strconcat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 831strcpy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 832strcspn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 833strdup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 834strerror . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 835strgetc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 836strjoin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 837strlen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 838strncasecmp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 839strncat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 840strncmp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 841strncpy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 842strpbrk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 843strputc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 844strrchr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 845strrep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 846strspn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 847strstr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 848strtok r . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 849strtok . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 851strxfrm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 853

    xvii

  • 20 Date and Time Functions 854asctime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 856clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 858ctime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 859difftime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 860gmtime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 861localtime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 862mktime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 863strftime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 864time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 868

    21 Extended Multibyte and Wide Character Functions 869btowc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 872fgetwc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 873fgetws . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 874fputwc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 875fputws . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 877fwide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 878getwc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 879getwchar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 880mbrlen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 881mbrtowc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 882mbsinit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 884mbsrtowcs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 885putwc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 887putwchar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 888ungetwc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 889wcrtomb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 891wcscat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 893wcschr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 894wcscmp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 896wcscoll . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 898wcscpy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 900wcscspn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 901wcsftime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 902wcslen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 904wcsncat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 905wcsncmp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 906wcsncpy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 908wcspbrk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 909wcsrchr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 911wcsrtombs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 913wcsspn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 915wcsstr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 916wcstod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 918wcstok . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 920wcstol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 922wcsxfrm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 924

    xviii

  • wctob . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 925wmemchr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 926wmemcmp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 928wmemcpy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 930wmemmove . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 932wmemset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 934

    22 Wide Character Functions 936iswalnum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 939iswalpha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 940iswcntrl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 941iswctype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 942iswdigit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 944iswgraph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 945iswlower . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 946iswprint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 947iswpunct . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 948iswspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 949iswupper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 950iswxdigit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 951towctrans . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 952towlower . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 953towupper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 954wctrans . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 955wctype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 956

    A Functions Not Supported in Specific Platforms 957A.1 HPUX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 957A.2 Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 959A.3 Solaris . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 962A.4 Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 963

    Index 971

    xix

  • Chapter 1

    Diagnostic Test

    The header assert.h defines the assert macro and refers to another macro,

    NDEBUG

    which is not defined by assert.h. If NDEBUG is defined as a macro at the point in the source file whereassert.h is included, the assert macro is defined simply as

    # define assert (ignore) ((void)0)

    The assert macro is redefined according to the current state of NDEBUG each time that assert.h is included.

    MacrosThe following macros are defined by the asserth header file.

    Macro Description

    assert Inserts diagnostic tests into program.

    PortabilityThis header has no known portability problem.

    1

  • Chapter 1: 2D and 3D plotting assert

    assert

    Synopsis#include void assert(scalar expression);

    PurposeInsert diagnostic tests into program.

    Return ValueThe assert macro returns no value.

    Parametersexpression argument.

    DescriptionThe assert macro puts diagnostic tests into programs; it expands to a void expression. When it is executed,if expression (which shall have a scalar type) is false (that is, compares equal to 0), the assert macro writesinformation about the particular call that failed (including the text of the arguement, the name of the sourcefile, the source line number, and the name of the enclosing function the latter are respectively the valuesof the preprocessing macro FILE and LINE and of the identifier func ) on the standard output. Itthen calls the abort function.

    Example

    /* a example for assert(). The program willabort while i < 0 and display error message.*/#include

    int main() {int i;for(i = 5; ; i--){

    printf("i= %d\n", i);assert(i >= 0);

    }}

    Output

    i= 5i= 4i= 3i= 2i= 1i= 0i= -1Assertion failed: i >= 0, file assert_func.c, line 10, function main()

    See Alsoabort()

    2

  • Chapter 2

    2D and 3D plotting

    The high-level plotting features described in this chapter is available only in Ch Professional Edition. Theheader file chplot.h contains the definition of the plotting CPlot class, defined macros used with CPlot, anddefinitions of high-level plotting functions that are based on CPlot class .

    The plotting class CPlot allows for high-level creation and manipulation of plots within the Ch language en-vironment. CPlot can be used directly within many types of Ch programs, including applications, functionfiles, and CGI programs. Plots can be generated from data arrays or files, and can be displayed on a screen,saved in a large number of different file formats, or generated as a stdout stream in png or gif file format onthe Web.

    The high-level plotting functions fplotxy(), fplotxyz(), plotxy(), plotxyf(), plotxyz(), and plotxyzf() aredesigned to be easy to use and allow plots to be created quickly. These functions can be used in conjunctionwith the CPlot member functions to create more sophisticated plots.

    CPlot Class

    The CPlot class can be used to produce two dimensional (2D) and three dimensional (3D) plots through aCh program. Member functions of the CPlot class generate actual plots using a plotting engine. Gnuplot isused internally as the plotting engine for display in this release of the Ch language environment.

    Public DataNone.

    Public Member Functions

    Function Description

    CPlot() Class constructor. Creates and initializes a new instance of the class.CPlot() Class destructor. Frees memory associated with a instance of the class.

    arrow() Add an arrow to a plot.autoScale() Enable or disable autoscaling of plot axes.axis() Enable or disable drawing of x-y axis on 2D plots.axisRange() Set the range for a plot axis.

    3

  • Chapter 2: 2D and 3D plotting

    axes() Specify the axes for a data set.barSize() Set the size of error bars.border() Enable or disable drawing of a border around the plot.borderOffsets() Set plot offsets of the plot border.boundingBoxOrigin() Obsolete, use CPlot::origin().boxBorder() Enable or disable drawing of a border for a plot of box type.boxFill() Fill a box or filled curve with a solid color or pattern.boxWidth() Set the width for a box.changeViewAngle() Change the view angles for a 3D plot.circle() Add a circle to a 2D plot.colorBox() Enable or disable the drawing of a color box for 3D surface plots.contourLabel() Enable or disable contour labels for 3D surface plots.contourLevels() Set contour levels for 3D plot to be displayed at specific locations.contourMode() Set the contour display mode for 3D surface plots.coordSystem() Set the coordinate system for a 3D plot.data() Add 2D, 3D, or multi-dimensional data to an instance of the CPlot class.data2D() Add one or more 2D data sets to an instance of the CPlot class.data2DCurve() Add a set of data for 2D curve to an instance of the CPlot class.data3D() Add one or more 3D data sets to an instance of the CPlot class.data3DCurve() Add a set of data for 3D curve to an instance of the CPlot class.data3DSurface() Add a set of data for 3D surface to an instance of the CPlot class.dataFile() Add a data file to an instance of the CPlot class.dataSetNum() Obtain the current data set number in an instance of the CPlot class.deleteData() Remove data from a previously used instance of the CPlot class.deletePlots() Remove any data from a previously used instance of the CPlot class

    and reinitialize option to default values.dimension() Set plot dimension to 2D or 3D.displayTime() Display the current time and date on the plot.enhanceText() Use enhanced text for special symbols.func2D() Add a set of 2D data using a function to an instance of the CPlot class.func3D() Add a set of 3D data using a function to an instance of the CPlot class.funcp2D() Add a set of 2D data using a function with a paramenter to an instance of the CPlot class.funcp3D() Add a set of 3D data using a function with a parameter to an instance of the CPlot class.getLabel() Get the label of an axis.getOutputType() Get the output type of a plot.getSubplot() Get a pointer to an element of a subplot.getTitle() Get the title of the plot.grid() Enable or disable display of a grid.isUsed() Test if an instance of the CPlot class has been used.label() Set axis labels.legend() Add a legend for a data set.legendLocation() Specify the plot legend location.legendOption() Set options for legends of a plot.line() Add a line to a plot.lineType() Set the line type, width, and color for lines, impulses, steps, etc.margins() Set plot margins.origin() Set the location of the origin for the bounding box of the plot.outputType() Set the plot output type.

    4

  • Chapter 2: 2D and 3D plotting

    plotType() Set the plot type.plotting() Produce a plot from an instance of the CPlot class.point() Add a point to a plot.pointType() Set the point type, size, and color.polarPlot() Set a 2D plot to use the polar coordinate system.polygon() Add a polygon to a plot.rectangle() Add a rectangle to a 2D plot.removeHiddenLine() Enable or disable hidden line removal for 3D plots.scaleType() Set the axis scale type for a plot.showMesh() Enable or disable display of mesh of a 3D plot.size() Change the size of a plot.size3D() Change the size of a 3D plot.sizeRatio() Change the aspect ratio of a plot.smooth() Smooth plotting curves by interpolation and approximation of data.subplot() Create a group of subplots.text() Add a text string to a plot.tics() Enable or disable display of axis tics.ticsDay() Set axis tic-mark labels to days of the week.ticsDirection() Set the direction in which axis tic-marks are drawn.ticsFormat() Set the number format for tic labels.ticsLabel() Set location and text label for arbitrary axis labels.ticsLevel() Set the z-axis offset for drawing of tics in 3D plots.ticsLocation() Specify the location of axis tic marks to be on the border or the axis.ticsMirror() Enable or disable display of axis tics on the opposite axis.ticsMonth() Set axis tic-mark labels to months.ticsPosition() Add tic-marks at the specified positions to an axis.ticsRange() Specify the range for a series of tics on an axis.title() Set the plot title.

    MacrosThe following macros are defined for the CPlot class.

    Macro Description

    PLOT ANGLE DEG Select units in degree for angular values.PLOT ANGLE RAD Select units in radian for angular values.PLOT AXIS X Select the x axis only.PLOT AXIS X2 Select the x2 axis on the top only.PLOT AXIS XY Select the x and y axes.PLOT AXIS XYZ Select the x, y, and z axes.PLOT AXIS Y Select the y axis only.PLOT AXIS Y2 Select the y2 axis on the right only.PLOT AXIS Z Select the z axis only.PLOT BORDER BOTTOM The bottom of the plot.PLOT BORDER LEFT The left side of the plot.PLOT BORDER TOP The top of the plot.

    5

  • Chapter 2: 2D and 3D plotting

    PLOT BORDER RIGHT The right side of the plot.PLOT BORDER ALL All sides of the plot.PLOT BOXFILL EMPTY Do not fill a box.PLOT BOXFILL SOLID Fill a box with a solid color.PLOT BOXFILL PATTERN Fill a box with a pattern.PLOT CONTOUR BASE Draw contour lines for a surface plot on the x-y plane.PLOT CONTOUR SURFACE Draw contour lines for a surface plot on the surface.PLOT COORD CARTESIAN Use a Cartesian coordinate system for a 3D plot.PLOT COORD CYLINDRICAL Use a cylindrical coordinate system in a 3D plot.PLOT COORD SPHERICAL Use a spherical coordinate system in a 3D plot.PLOT OFF Flag to disable an option.PLOT ON Flag to enable an option.PLOT OUTPUTTYPE DISPLAY Display the plot on a screen.PLOT OUTPUTTYPE FILE Output the plot to a file.PLOT OUTPUTTYPE STREAM Output the plot as a stdout stream.PLOT PLOTTYPE BOXERRORBARS It is a combination of the PLOT PLOTTYPE BOXES and

    PLOT PLOTTYPE YERRORBARS plot types.PLOT PLOTTYPE BOXES Draw a box centered about the given x coordinate.PLOT PLOTTYPE BOXXYERRORBARS A combination of PLOT PLOTTYPE BOXES and

    PLOT PLOTTYPE XYERRORBARS plot types.PLOT PLOTTYPE CANDLESTICKS Display box-and-whisker plots of financial or statistical data.PLOT PLOTTYPE DOTS Use dots to mark each data point.PLOT PLOTTYPE FILLEDCURVES Fill an area bounded in a side by a curve with a solid color or pattern.PLOT PLOTTYPE FINANCEBARS Display finanacial data.PLOT PLOTTYPE FSTEPS Adjacent points are connected with two line segments,

    one from (x1,y1) to (x1,y2), and a second from (x1,y2)to (x2,y2).

    PLOT PLOTTYPE HISTEPS The point x1 is represented by a horizontal line from((x0+x1)/2,y1) to ((x1+x2)/2,y1). Adjacent lines areconnected with a vertical line from ((x1+x2)/2,y1) to((x1+x2)/2,y2).

    PLOT PLOTTYPE IMPULSES Display vertical lines from the x-axis (for 2D plots) orthe x-y plane (for 3D plots) to the data points.

    PLOT PLOTTYPE LINES Data points are connected with a line.PLOT PLOTTYPE LINESPOINTS Markers are displayed at each data point and connected

    with a line.PLOT PLOTTYPE POINTS Markers are displayed at each data point.PLOT PLOTTYPE STEPS Adjacent points are connected with two line segments,

    one from (x1,y1) to (x2,y1), and a second from (x2,y1)to (x2,y2).

    PLOT PLOTTYPE SURFACES Data points are connected and smoothedas a surface. For 3D plot only.

    PLOT PLOTTYPE VECTORS Display vectors.PLOT PLOTTYPE XERRORBARS Display dots with horizontal error bars.PLOT PLOTTYPE XERRORLINES Display linepoints with horizontal error lines.PLOT PLOTTYPE XYERRORBARS Display dots with horizontal and vertical error bars.PLOT PLOTTYPE XYERRORLINES Display linepoints with horizontal and vertical error lines.PLOT PLOTTYPE YERRORBARS Display points with vertical error bars.

    6

  • Chapter 2: 2D and 3D plotting

    PLOT PLOTTYPE YERRORLINES Display linepoints with vertical error lines.PLOT SCALETYPE LINEAR Use a linear scale for a specified axis.PLOT SCALETYPE LOG Use a logarithmic scale for a specified axis.PLOT TEXT CENTER Center text at a specified point.PLOT TEXT LEFT Left justify text at a specified point.PLOT TEXT RIGHT Right justify text at a specified point.PLOT TICS IN Draw axis tic-marks inward.PLOT TICS OUT Draw axis tic-marks outward.

    FunctionsThe following functions are implemented using the CPlot class.

    Function Description

    fplotxy() Plot a 2D function of x in a specified range or initialize an instance of the CPlotclass.

    fplotxyz() Plot a 3D function of x and y in a specified range or initialize an instance of theCPlot class.

    plotxy() Plot a 2D data set or initialize an instance of the CPlot class.plotxyf() Plot 2D data from a file or initialize an instance of the CPlot class.plotxyz() Plot a 3D data set or initialize an instance of the CPlot class.plotxyzf() Plot 3D data from a file or initialize an instance of the CPlot class.

    ReferencesT. Williams, C. Kelley, D. Denholm, D. Crawford, et al., Gnuplot An Interactive plotting Program,Version 3.7, December 3, 1998, ftp://ftp.gnuplot.vt.edu/.

    Copyright Notice of Gnuplot

    /*[* Copyright 1986 - 1993, 1998 Thomas Williams, Colin Kelley** Permission to use, copy, and distribute this software and its* documentation for any purpose with or without fee is hereby granted,* provided that the above copyright notice appear in all copies and* that both that copyright notice and this permission notice appear* in supporting documentation.** Permission to modify the software is granted, but not the right to* distribute the complete modified source code. Modifications are to* be distributed as patches to the released version. Permission to* distribute binaries produced by compiling modified sources is granted,

    7

  • Chapter 2: 2D and 3D plotting

    * provided you* 1. distribute the corresponding source modifications from the* released version in the form of a patch file along with the binaries,* 2. add special version identification to distinguish your version* in addition to the base release version number,* 3. provide your name and address as the primary contact for the* support of your modified version, and* 4. retain our contact information in regard to use of the base* software.* Permission to distribute the released version of the source code* along with corresponding source modifications in the form of a patch* file is granted with same provisions 2 through 4 for binary* distributions.** This software is provided "as is" without express or implied warranty* to the extent permitted by applicable law.

    ]*/

    8

  • Chapter 2: 2D and 3D plotting CPlot::arrow

    CPlot::arrow

    Synopsis#include void arrow(double x head, double y head, double z head, double x tail, double y tail, double z tail, ...

    /* [char option] */);

    Syntaxarrow(x head, y head, z head, x tail, y tail, z tail)arrow(x head, y head, z head, x tail, y tail, z tail, option)

    PurposeAdd an arrow to a plot.

    Return ValueNone.

    Parametersx head The x coordinate of the head of the arrow.

    y head The y coordinate of the head of the arrow.

    z head For 2D plots this is ignored. For 3D plots, the z coordinate of the head of the arrow.

    x tail For x coordinate of the tail of the arrow.

    y tail The y coordinate of the tail of the arrow.

    z tail For 2D plots this is ignored. For 3D plots, the z coordinate of the tail of the arrow.

    option The option for the arrow.

    DescriptionThis function adds an arrow to a plot. The arrow points from (x tail, y tail, z tail) to (x head, y head,z head). These coordinates are specified using the same coordinate system as the curves of the plot.

    An arrow is not counted as a curve. Therefore, it does not affect the number of legends added byCPlot::legend(legend, num).

    The optional argument option of string type with the following values can be used to fine tune thearrow based on the argument for set arrow command of the gnuplot.

    { {nohead | head | backhead | heads}{size ,{,}}{filled | empty | nofilled}{front | back}{ {linestyle | ls }

    | {linetype | lt }{linewidth | lw

  • Chapter 2: 2D and 3D plotting CPlot::arrow

    Specifying nohead produces an arrow drawn without a heada line segment. This gives you yetanother way to draw a line segment on the plot. By default, an arrow has a head at its end. Specifyingbackhead draws an arrow head at the start point of the arrow while heads draws arrow heads on bothends of the line. Not all terminal types support double-ended arrows.

    Head size can be controlled by size , orsize ,,, where defines length of each branchof the arrow head and angle the angle (in degrees) they make with the arrow. is in x-axis units; this can be changed by first, second, graph, screen, or character before the length;see coordinates for details. Backangle only takes effect when filled or empty is also used. Then, is the angle (in degrees) the back branches make with the arrow (in the same directionas ). The fig terminal has a restricted backangle function. It supports three different an-gles. There are two thresholds: Below 70 degrees, the arrow head gets an indented back angle. Above 110degrees, the arrow head has an acute back angle. Between these thresholds, the back line is straight.

    Specifying filled produces filled arrow heads (if heads are used). Filling is supported on filled-polygoncapable terminals, otherwise the arrow heads are closed but not filled. The same result (closed but not filledarrow head) is reached by specifying empty.

    If front is given, the arrow is written on top of the graphed data. If back is given (the default), thearrow is written underneath the graphed data. Using front will prevent an arrow from being obscured bydense data.

    The linetype is followed by an integer index representing the line type for drawing. The line t