How to add tables in the Live Editor?

Antworten (4)

Ganesh
Ganesh am 21 Sep. 2019
Bearbeitet: Ganesh am 21 Sep. 2019

4 Stimmen

Using \matrix is perhaps the only way to do this. Here is an example to create a table with math:
\matrix{
\text{Component} & n_0 \text{mol} & n(\tau) \text{mol} & p(\tau) = P n(\tau)/\Sigma n(\tau) \cr
N_2 & 1 & 1-\xi/2 & P(1-\xi/2)/(4-\xi) \cr
H_2 & 3 & 3-3\xi/2 & P(3-3\xi/2)/(4-\xi) \cr
NH_3 & 0 & \xi & P\xi/(4-\xi) \cr
\Sigma & 4 & 4-\xi & P \cr
}
Entering this into the live editor's LaTeX equation box produces the following:
Anselm Griffin
Anselm Griffin am 18 Okt. 2018

0 Stimmen

Hi Looks like you cant. If anybody else knows can they let us know please? Regards Anselm

2 Kommentare

A=randi(10,10,3);
table(A)
YT
YT am 18 Okt. 2018
This was not what I meant. I found a solution. See my comment below.

Melden Sie sich an, um zu kommentieren.

YT
YT am 18 Okt. 2018

0 Stimmen

I found a way around by using matrix as shown below.
$\left[\matrix{\textbf{Heading1}&\textbf{Heading2}&\quad&\textbf{Heading3}&\quad& \textbf{Heading4}&\quad&\textbf{Heading5}\cr & &\quad& &\quad& &\quad& }\right]$
Julie Shapiro
Julie Shapiro am 10 Jul. 2025

0 Stimmen

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

Gefragt:

YT
am 29 Mai 2018

Beantwortet:

am 10 Jul. 2025

Community Treasure Hunt

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

Start Hunting!

Translated by