LaTeX matrix when publishing

110 views (last 30 days)
Rick on 9 Sep 2015
Commented: Pedro Pedrosa on 10 May 2019
Hello,
I'm trying to publish some latex, and for some reason it is not accepting my matrix. I have tested on another site and it seems to work, but I am wondering if the syntax for matlab latex is different from other places
% $$\vec {x} = \begin {bmatrix} T-T_{s} \\ C_{A} - C_{As} \\ C_{P} - C_{Ps} \end % {bmatrix}$$
Is not making a matrix for me. What is wrong?
This is the output on the published file
Error updating Text.
String must have valid interpreter syntax:
 \vec {x} = \begin {bmatrix} T-T_{s} \\ C_{A} - C_{As} \\ C_{P} - C_{Ps} \end {bmatrix}

Walter Roberson on 10 Sep 2015
bmatrix is part of amsmath but you cannot (at all easily) load the ams* packages.
Pedro Pedrosa on 10 May 2019
If you want square braces use \matrix{} enclosed with \left[ \right].