功能:符号矩阵求迹

格式:
[b, k] = SymMatrixTrace(a)

a:为n阶符号方阵

b:执行成功返回的a矩阵的迹
k:执行成功与否的标志,如果k为1表示执行成功,返回0表示a参数有误

例子:
a =SymMatrix([
"a00","a01","a02"
"a10","a11","a12"
"a20","a21","a22"])//创建一个3阶矩阵

z = SymMatrixTrace(a)//回车可得到类似如下结果
z = { a00+a11+a22 }