MATLAB Report Generator | ![]() ![]() |
Category
Description
The Variable Table component creates and inserts a table that includes all variables in the MATLAB workspace. You can find all the variables in the MATLAB workspace by typing whos
at the command line.
Attributes
This is the Variable Table attribute page.
Note To view a component attribute page in the Setup File Editor, select the component in the setup file outline on the left and click on the Options tab. If the component is not in the setup file outline, you must add it to the outline first. See Building and Editing the Setup File for a discussion on how to add a component to the outline. |
Base workspace - select this option to read variables from the MATLAB workspace.
MAT-file - select this option to read variables from a binary file with a .MAT extension. You can use the %<VariableName>
notation. See %<VariableName> Notation in the Text component reference
Display Options
Automatic (Variables from MATLAB workspace) - select this option if you want the table title to be a variable name from the MATLAB workspace
Manual - select this option and enter the title in this field if you want a custom title for the variable table.
If you have a title for a table, it is included in the List of Tables if the stylesheet you chose in the Report Options attribute page supports it. See Report Format and Stylesheets to find stylesheets that have a List of Tables.
Variable size (MxN) - select this option to include the size of the variable.
Variable memory bytes - select this option to include the number of memory bytes occupied by the variable.
Variable class - select this option to include the variable class.
Variable value - select this option to include the value of the variable. Note that large variable arrays are collapsed to "[MxN CLASS]"
. For example, if you have a 300-by-200 double array, it will display in the report as [300x200 DOUBLE
].
Example
This is an example of a variable table that includes variable size, variable memory bytes, and variable value information in the table columns.
name |
size |
bytes |
Value |
aCell |
1x2 |
238 |
{ [ 1 2 3 4 ] Speed (kph) } |
aNumber |
1x1 |
8 |
1 |
aString |
1x11 |
22 |
Speed (kph) |
aStructure |
1x1 |
302 |
[struct w/ fields. Inputs, Outputs] |
aVector |
1x4 |
32 |
[ 1 2 3 4 ] |
Insert anything into report?
Filename
![]() | MATLAB/Toolbox Version Number | Report Generator Components | ![]() |