Scripting Commands/VAR

From TNT

Jump to: navigation, search

VAR
Version: 1.1.
Menu path: to do.

VAR
   N;       report name and value of variable N (no N = all vars.) 
   
   /N;      same, using bits (up to 30) 
   
   = N XXX; name variable number N as "XXX."  Replacing the N by a '+' 
            names the next variable. Variables cannot be renamed, but 
            variables named within a file can be denamed with '-'.  This 
            allows variables to behave as "static" within a file.  If 
            several variables have identical names, using the name 
            accesses the last one named (e.g. in the current file). 
   
   :        name variables, using a looser format than with =.  All that 
            is neded here is a list of names (and their dimensions). 
   
   -N;      dename all variables above N (no N = all variables named from 
             within the current input file. 
   
   N;       if N is defined as an array, report all the values in the array 
   
   N*;      same, saving in "setarray" format (readable by the program) 
   
   +        display a (very simple) graph with the values of two arrays. 
            Syntax is:  
                 var + X [ minx maxx] Y [ miny maxy ] array_A array_B ;  
            X is the number of spaces to use on X-axis, Y is number of  
            lines to use on Y-axis; minx and maxy are starting and end 
            points of X axis, likewise for Y (if unspecified, min/max 
            values in the array are used). Array_A and array_B are names 
            of (one-dimensional) arrays; the graph plots array_B[i]  
            against array_A[i]; if array_A doesn't have the same number 
            of values as array_B, then the minimum number is  
            used; if array_B is not specified, then the graph plots 
            array_A[i] against i (for each of the values in array_A). 
   
   &X Y     linear regression of variables X and Y (must be arrays). If 
            *W follows Y, then weights in W are used. Weights must be 
            between 0 and 1 (if some weights exceed unity, all weights 
            are rescaled; having a point of weight W is equivalent to  
            having W points with those coordinates instead of one). If 
            a number N follows after the arrays, then only the first 
            N values of the arrays are considered in the regression.
Personal tools