Object Reference : Object View and Procedure Reference : Sym
Excel Files
Excel Examples
HTML Files
HTML Examples
Text and Binary Files
Text and Binary File Examples (.txt, .csv, etc.)
Symmetric matrix (symmetric two-dimensional array).
Sym Declaration
sym declare sym object.
Declare by providing a name after the sym keyword, with the optionally specified dimension in parentheses:
sym(10) symmatrix
You may optionally assign a scalar, a square matrix or another sym in the declaration. If the square matrix is not symmetric, the sym will contain the lower triangle. The sym will be sized and initialized accordingly.
Sym Views
cor correlation matrix by columns.
cov covariance matrix by columns.
eigen eigenvalues calculation for a symmetric matrix.
label label information for the symmetric matrix.
sheet spreadsheet view of the symmetric matrix.
stats descriptive statistics by column.
Sym Graph Views
Graph creation views are discussed in detail in “Graph Creation Command Summary”.
area area graph of the columns of the matrix.
band area band graph.
bar bar graph of each column against the row index.
boxplot boxplot graph.
distplot distribution graph.
dot dot plot graph.
errbar error bar graph view.
hilo high-low(-open-close) chart.
line line graph of each column against the row index.
mixed mixed-type graph.
pie pie chart view.
qqplot quantile-quantile graph.
scat scatter diagrams of the columns of the sym.
scatmat matrix of all pairwise scatter plots.
scatpair scatterplot pairs graph.
seasplot seasonal line graph.
spike spike graph.
xyarea XY area graph.
xybar XY bar graph.
xyline XY line graph.
xypair XY pairs graph.
Sym Procs
clearhist clear the contents of the history attribute .
displayname set display name.
fill fill the elements of the matrix.
import imports data from a foreign file into the sym object.
olepush push updates to OLE linked objects in open applications .
read (deprecated) import data from disk.
setattr set the value of an object attribute .
setformat set the display format for the sym spreadsheet.
setindent set the indentation for the sym spreadsheet.
setjust set the justification for the sym spreadsheet.
setwidth set the column width in the sym spreadsheet.
write export data to disk.
Sym Data Members
String values
@attr(“arg”) string containing the value of the arg attribute, where the argument is specified as a quoted string.
@description string containing the Sym object’s description (if available).
@detailedtype string with the object type: “SCALAR”.
@displayname string containing the Sym object’s display name. If the Sym has no display name set, the name is returned.
@name string containing the Sym object’s name.
@remarks string containing the Sym object’s remarks (if available).
@source string containing the Sym object’s source (if available).
@type string with the object type: “SCALAR”.
@units string containing the Sym object’s units description (if available).
@updatetime string representation of the time and date at which the Sym was last updated.
Scalar values
(i,j) (i,j)-th element of the sym. Simply append “(i,j)” to the sym name (without a “.”).
Sym Examples
The declaration:
sym results(10)
creates the matrix RESULTS and initializes each value to be 3. The following assignment statements also create and initialize sym objects:
sym copymat=results
sym covmat1=eq1.@coefcov
sym(3,3) count
count.fill 1,2,3,4,5,6,7,8,9,10
Graphs, covariances, and statistics may be generated for the columns of the matrix:
You can use explicit indices to refer to matrix elements:
scalar diagsum=cov1(1,1)+cov1(2,2)+cov(3,3)