create a table in the live script

37 Ansichten (letzte 30 Tage)
Victor Salit
Victor Salit am 6 Jan. 2023
Beantwortet: Julie Shapiro am 10 Jul. 2025
Hi,
I am documenting a function in the live editor and would like to create a table in the text section, similar to the tables in the matlab documentation. For example the DocPolynom Class Properties table in the https://de.mathworks.com/help/matlab/matlab_oop/a-polynomial-class-1.html

Antworten (2)

Cris LaPierre
Cris LaPierre am 6 Jan. 2023
Currently, the only way to add editable tables to a live script is to use LaTeX. Although this answer is for MATLAB Grader, the same principles apply to creating a table in live scripts using LaTeX
LaTeX tables cannot be formatted like the html tables you reference (color, lines). If that is what you desire, I recommend creating the tables elsewhere, capturing them as images, and inserting the image into your live script.

Julie Shapiro
Julie Shapiro am 10 Jul. 2025
Starting in R2023b, you can add editable tables to live scripts using the toolstrip.
To insert a table, on the toolstrip, go to the Insert tab and select Table. Move the cursor over the grid to highlight the numbers of rows and columns you want and then click to add the table. To create a larger table, select the Insert a table button and specify the numbers of rows and columns in the dialog box.
For more information, see Format Text in the Live Editor.

Kategorien

Mehr zu Live Scripts and Functions finden Sie in Help Center und File Exchange

Produkte


Version

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by