Use Tables

MuPAD® notebooks will be removed in a future release. Use MATLAB® live scripts instead.

MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.

Create Tables

To insert a table in a notebook:

  1. Select the place where you want the table to appear.

  2. Select Insert>Table.

  3. In the resulting dialog box, select the number of columns and rows and click OK.

Add and Delete Rows and Columns

To add a row or column to an existing table or delete an existing row or column:

  1. Click a cell where you want to add or delete a row or column.

  2. Select Edit>Table from the main menu and select the required action.

    If you inserted a row, it appears above the row with the selected cell. If you inserted a column, it appears to the left from the selected cell.

Format Tables

You can change the appearance of a table in a MuPAD® notebook. To format a table:

  1. Click the table you want to format.

  2. Select Format>Table from the main menu.

  3. In the Table Format dialog box, select your settings:

    PositionText wrapping
    MarginsCell margins (all margins have the same size.)
    PaddingDistance between the text and the border of a cell
    BorderWidth of the line used to draw cell borders
    SpacingSpace between the cells
    BackgroundBackground color of the cells

    If you want to experiment with different settings, and see how the formatted table looks in your notebook, click the Apply button. This button applies formatting to the selected table and leaves the Table Format dialog box open. You can change settings several times without having to open this dialog box for each change. When you finish formatting, click OK to close the Table Format dialog box.