数学建模社区-数学中国
标题:
matlab如何计算带三角符号函数的矩阵?
[打印本页]
作者:
冬季的期盼
时间:
2013-7-19 15:21
标题:
matlab如何计算带三角符号函数的矩阵?
比如
2013-7-19 15:21 上传
下载附件
(7.69 KB)
*
2013-7-19 15:21 上传
下载附件
(6.51 KB)
两个矩阵相乘
首先θ是变量,能不能不赋值输入
另外就是结果的三角函数有没有可能自己化简,比如sin^2+cos^2=1
化简可以不要,主要问题是怎么能把变量输进去
作者:
袁海亮
时间:
2013-7-20 09:43
只要定义符号变量theta就可以,使用sym()定义。theta定义为符号变量,sin(theta)就是一个符号函数了
作者:
百年孤独
时间:
2013-7-20 10:22
syms theta1;
A=[sin(theta1),-cos(theta1),0;cos(theta1),sin(theta1),0;0,0,1]
B=[cos(theta1),-sin(theta1),0;sin(theta1),cos(theta1),0;0,0,1]
C=A*B
D=simple(C)
运行结果:
A =
[ sin(theta1), -cos(theta1), 0]
[ cos(theta1), sin(theta1), 0]
[ 0, 0, 1]
B =
[ cos(theta1), -sin(theta1), 0]
[ sin(theta1), cos(theta1), 0]
[ 0, 0, 1]
C =
[ 0, -sin(theta1)^2-cos(theta1)^2, 0]
[ cos(theta1)^2+sin(theta1)^2, 0, 0]
[ 0, 0, 1]
D =
[ 0, -1, 0]
[ 1, 0, 0]
[ 0, 0, 1]
作者:
百年孤独
时间:
2013-7-20 10:23
用syms定义一下
欢迎光临 数学建模社区-数学中国 (http://www.madio.net/)
Powered by Discuz! X2.5