Open main menu

Changes

no edit summary
In order to type matrices in math formulas, there is the command {{cmd|definemathmatrix}}. Once a certain type of matrix is defined, one can also add a simple command in order to type matrices in a Matlab or Scilab format.
Here are a few examples.
 <context source = "yes">%% defining matrix with parentheses\setuplayout[scale=0.8,width=13cm] \definemathmatrix[pmatrix] % defining matrix with parentheses
[matrix:parentheses]
[simplecommand=pmatrix]
%\definemathmatrix[bmatrix] % defining matrix with brackets\definemathmatrix[bmatrix]
[matrix:brackets]
[simplecommand=bmatrix]
%\definemathmatrix[determinant] % defining determinant with bars\definemathmatrix[determinant]
[matrix:bars]
[simplecommand=thedeterminant]
\starttext 
Let $A$ be the matrix
\startformula
A := \startpmatrix \NC 2 \NC 3 \NR \NC 1 \NC 2 \NR \stoppmatrix.
\stopformula
 
Show that
\startformula
{\rm det}(A) = \startdeterminant
\NC 2 \NC 3 \NR \NC 1 \NC 2 \NR \stopdeterminant = 1.
\stopformula
 
Compute the matrix $AB$ where $B$ is the matrix
\startformula
B := \pmatrix{2, -3 ; -1, 2}.
\stopformula
\stoptext
</context>
 
 
 
It is possible to have different delimiters on the left and on the right. For instance:
<context source = yes >
1,031

edits