The Matrix Tree

Matrix Tree

Add a matrix

To add a matrix, click on the Matrices tree with the right mouse button. In the pop up menu that appears select New matrix: a sub-menu appears, which allows you to select the type of matrix: numeric, text, boolean, date. You can for example select numeric.
From here  you set the initial size of the matrix in the New Matrix Size dialog and then you open the Matrix Editor on the new matrix.

View a matrix

To display the content of a matrix, right click with the mouse on the matrix name in the project tree and select the View Matrix menu.  This opens the Matrix Viewer.
You can also view the matrix double-clicking on the matrix name.

Edit a matrix

To edit a matrix right click with the mouse on the matrix name in the tree and select the Edit Matrix menu. The Matrix Editor opens with the selected matrix. You can change the content of the matrix and save it again.
When you save the matrix, all the functions that have this matrix as input are recalculated, possibly producing new results; all the presentations and charts containing this matrix are updated; all the viewers showing this matrix are updated.
You cannot edit the output matrix of a function: only matrices that have been written using the matrix editor (and therefore are called base matrices) can be edited again. You can recognize a base matrix in the tree because in its icon the top of the matrix is green; in a calculated matrix it is blue.

Remove one or more matrices

To remove one or more matrices:
At this point, the system tries to remove all the selected matrices.
 
You can only remove matrices that are not involved in calculations (are not output or input of functions, presentations or charts). If some of the matrices you try to remove are involved in calculations, no matrix is removed and a message like the following is showed:

Remove Matrix Error

The message describes the reason why it was not possible to remove the matrices, so that you can find a solution and try again.
Typically if you want to remove one or more matrices first you need to remove the functions that have them as input or output matrices. Functions can almost always be removed, because only timers depend by them.

If it is possible to remove the matrix you need to confirm your decision. If you do it the matrix is removed from the project.

Rename a matrix

To rename a matrix right click with the mouse on the matrix name in the tree and select the Rename Matrix menu. The name-package dialog appears. Set the new name and package and click OK. The matrix is renamed, both in the project toolbox and as file.
All the dependent functions and presentations are saved to keep track of the change.

Move one or more matrices

Right click with the mouse on the matrix name in the tree and select the Move Matrices menu. Select the package where you want to move the matrix to using the choose package dialog. If you select more matrices all will be moved to the final package.

Comment a matrix

To comment a matrix right click with the mouse on the matrix name in the tree and select the Comment Matrix menu. The comment dialog appears.

Get some information about a matrix

To get some information about a matrix right click with the mouse on the matrix name in the tree and select the Info Matrix menu. The matrix information view appears.

Duplicate a matrix

Right clicking with the mouse on the matrix name in the tree and selecting the Duplicate Matrix menu a copy of the matrix is made. You enter the new name-package of the matrix with the name-package dialog that appears.
A typical reason to duplicate a matrix is when the matrix is the result of some calculation and therefore cannot be edited. Duplicating it you have a matrix with the same content that can be changed.

Add a function with a matrix

Right clicking with the mouse on the matrix name in the tree and selecting the Add function with you open the function editor to add a new function. In the editor, the first input matrix of the new function is the selected matrix.
This menu is supposed to speed up the creation of new functions, expecially when the function needs only one input matrix.