Tables
Use tables to display numerical output from one or more variables in your simulations.
Table basics:
- The table can be oriented in two ways:
Vertical time - values are shown in columns, with each row containing a value at a different time.
Horizontal time - values are shown in rows, with each column containing a value at a different time.
- You can define one or more pages in a table. Each page can show a number of different variables, each in its own row or column.
- Variables can come from the root model or any module within the model.
- You can add variables to the Item list.
- You can make your tables comparative. Subsequent runs are added to new columns (vertical time) or rows (horizontal time).
Note: You can copy the output from a table into a word processor document or a spreadsheet. You can also import and export data, and can even create dynamic links to external data, keeping the data synced with the model. For more information, see Importing and Exporting Data.
To add a table to a model
- In the Build toolbar, click the table tool .
-
Click the diagram to place the table.
The table will appear, and the table properties will appear in the Properties panel.
-
Use the Table properties to define one or more pages in the table.
Define a table
Use the Table Settings tab of the Properties panel to define your table.
-
Click the table to show the Properties panel. Click the Settings tab if it's not selected.
-
Enter a table name in the Title box. The name will appear in the header of the table.
The first item in the Item List is already created. Click this item, and specify a variable to use for it.Tell me how
Choose a variable in one of the following ways:
- Click on the then in the Find window that opens click on the variable you want. If the variable is arrayed you will be asked to select array elements, placeholders or wildcards.
- If you have already selected a variable, its name will appear in the variable box and you can replace it by:
- In the Variable box, begin typing the name of the variable you want to add. A list of matching variables will appear. Click on the variable you want (or use the arrow keys to move to it and press Enter).
- Click the Find icon at the top of the Properties panel and begin typing the name of the variable you want to add. A list of matches will appear. Drag the name you want to the Variable box. If it is arrayed you will be asked to select an element.
- Ctrl-drag (⌘-drag on Mac) directly from the model to the Variable box.
The item name will change to the name of the selected variable, and the table will be populated.
- To add another item, click the button below the Item List.
- If you've selected an arrayed variable, the Choose Subscript dialog box opens so that you can select which elements in the array to include in the table. To include all elements in a dimension, select the * in the Choose Subscript dialog box; otherwise, select the specific element to include for each dimension.
- Use the rest of the options in the Define Table dialog box to define the table. For detailed information about all of the options, see Table Properties.
-
To add another page, click the button at the top of the Properties panel.
Repeat steps 2 - 3 to define the table for the second page. For more information on creating and moving between pages, see Table Properties.
-
When you're finished defining pages for the table, click OK.
The table shows the last table you displayed in the Define Table dialog box.
You can turn pages in, move, resize, or minimize the table. For more information, see Working with graphs and tables.
Note If you select * when adding an array to a table and it is the only thing in the table the title of the table will be the name of the variables, and each entry will be the name of the array element.
To delete a table item or page:
- Open the Table Properties panel by double-clicking on the table. Then, locate the page you want to delete (or click the item you want to delete).
- Click . The page or item will be deleted.
To format variables in the table
By default, tables use the format and precision settings of the variables displayed. To change these, go to the Scales and Ranges tab of the properties panel for the variable of interest. You can also override these settings for a table.
Note: The selections you make on the table for precision, units, and scaling affect the display of the variable in the table only.
-
In the table, right-click, then select Format from the menu that appears. Then select Multiple, the name of the variable you want to change, or Time.
If you select Multiple the Format Numbers dialog box will open.
If you select a specific variable the Format Variable dialog box will open.
If you select time, a list of the Time Labels defined for this model will appear. To add a time label see Manage Time Labels dialog box
- Select the format options you want to apply to the variable in the table.
- Click OK.
To change table column widths
By default, tables adjust column width to fit the contents. You can change the width of columns other than the first (Time or name) column.
- Open Table Properties by double-clicking on the table, or by right-clicking and selecting Open Properties from the menu.
- Go to the style tab and uncheck "Auto-size column width" under Options. Then, enter your preferred width, in pixels, of columns. You can also specify the width of blank (spacer) columns.
See Also