User Tools

Site Tools


jvs:cigal:manual:chapter4:vdata

CIGAL Reference Manual, Chapter 4 (Variables): vdata

vdata -- Matrix of lengths and areas computed by SKETCH command

usage: vdata

        VDATA is an internally defined matrix variable.  It is created by the SKETCH
    command to store length and area values computed by the MEASURE function.
    The matrix has two real (i.e., floating point) values in each row, length
    first and then area.  The number of rows is determined by how many measurements
    you have made.  Because VDATA is created as a variable in a temporary disk file
    there is no limit to the number of entries you can store (up to the total free
    space on your disk).
    Each time you do a measurement in SKETCH, the values are added to the end of
    VDATA.  If you go in and out of the SKETCH command the matrix does not start over,
    new values just keep adding on at the end.  If you want to erase the values in
    VDATA and start again you use the ERASE command as:
                erase vdata
This does not delete the variable, it simply resets its pointers to empty.
    Outside of SKETCH, VDATA can be manipulated just as any other matrix variable.
    For example, you can select values, calculate means, or write the values to a
     disk file or printer.  Because VDATA is stored in a temporary file you should be
     sure to copy it to some other file if you want to save the data beyond the end of
     the current CIGAL session.    The length of VDATA is indicated by the internally
     defined integer variable NVDATA, which is set to the number of rows in the matrix.
     You can change the length of VDATA by changing the value of NVDATA.  For example,
     setting NVDATA to zero is equivalent to erasing VDATA.  You can sometimes also
     recover lost values in VDATA simply by setting NVDATA to the number of rows that
     you used to have, provided that those values have not been overwritten by new values.
    The temporary disk file used to store VDATA (called VDATA.TMP) is not deleted at
    the end of a CIGAL session.  The file will normally be truncated automatically
    during the next CIGAL session when you use the SKETCH command to create VDATA again.
    However if you assign a value to NVDATA, before using the SKETCH command, then the
    VDATA variable is created without truncating the VDATA.TMP file.  This can be used
    to recover VDATA values lost if you exit CIGAL prematurely or after a power failure, etc.
    Examples of using VDATA:
       sketch                           ; draw vectors and measure many
                                        ; lengths and areas
       type vdata                       ; type out values on screen
       mean(vdata(0))                   ; calculate mean of lengths
       a = mean(vdata(1))               ; store mean area in variable A
       type vdata(0) > 'leng.dat'       ; store lengths in file
       type vdata(1,3:20) > 'area.dat'  ; store some areas in file
       type vdata > 'all.dat'           ; store length and areas in file
       erase vdata                      ; reset VDATA variable to empty

 [ERASE][2].

See Also:
ERASE(2), NVDATA(4), SKETCH(2), VARIABLES(1), VECS(4)

CIGAL Home, CIGAL Manual, Variables List, Manual Help

jvs/cigal/manual/chapter4/vdata.txt · Last modified: 2014/08/04 16:03 (external edit)