Maxima: Simplify matrix components

左心房为你撑大大i 提交于 2019-12-23 15:50:21

问题


in Maxima, how is it possible to simply equations that are components of a matrix? I have a rather big matrix and want to simplify the components of it (e.g. factor out and cancel out).

Thanks.


回答1:


Most functions (where appropriate) already thread over lists, matrices, equations, etc...

For example:

(%i1) a : [[cos(x)^2+sin(x)^2,1],[0,sin(x)*cos(x)]];
                      2         2
(%o1)            [[sin (x) + cos (x), 1], [0, cos(x) sin(x)]]
(%i2) trigsimp(a);
(%o2)                    [[1, 1], [0, cos(x) sin(x)]]
(%i3) trigreduce(a);
                 cos(2 x) + 1   1 - cos(2 x)          sin(2 x)
(%o3)          [[------------ + ------------, 1], [0, --------]]
                      2              2                   2
(%i4) expand(%o3);
                                         sin(2 x)
(%o4)                       [[1, 1], [0, --------]]
                                            2

If this doesn't help you, can you give more details of the problem that you're having?



来源:https://stackoverflow.com/questions/7662477/maxima-simplify-matrix-components

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!