LaTeX in Live Scripts - Using \matrix
古いコメントを表示
I want to use the new Live Scripts feature to include a matrix. The usual way of doing this:
\begin{pmatrix} A & B \\ C & D \end{pmatrix}
doesn't work.
The documentation says to use the \matrix command. This works for a row vector:
\pmatrix{a & b}
but not for a column vector or full matrix, i.e.
\matrix{a & b \\ c & d}
How would I render a full matrix in the equation editor within live scripts?
採用された回答
その他の回答 (2 件)
uyazgan
2016 年 12 月 13 日
In order to generate matrices with square brackets the following syntax can be used:
A= \left[\matrix{ 1 & 2 \cr 3 &4} \right]
This generates the following matrix:

1 件のコメント
Stephanie
2021 年 1 月 24 日
Thank you; I was trying to use LaTeX's "bmatrix" in a Matlab live script and this worked!
Walter Roberson
2021 年 1 月 24 日
編集済み: Walter Roberson
2023 年 1 月 2 日
0 投票
I have not checked Live Script, but MATLAB graphics support \begin{array}
It supports a variety of matrix bracket styles. At some point I posted some other examples, but it would take me a while to locate previous posts.
カテゴリ
ヘルプ センター および File Exchange で Logical についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
