怎样运用MATLAB计算三个函数矩阵相乘,手工计算太麻烦了
A =[(2^(1/2)*3^(1/2)*cos(x))/3,(2^(1/2)*3^(1/2)*cos(x - (2*pi)/3))/3,(2^(1/2)*3^(1/2)*cos((2*pi)/3 + x))/3]
[ -(2^(1/2)*3^(1/2)*sin(x))/3, -(2^(1/2)*3^(1/2)*sin(x - (2*pi)/3))/3, -(2^(1/2)*3^(1/2)*sin((2*pi)/3 + x))/3]
[ 3^(1/2)/3, 3^(1/2)/3, 3^(1/2)/3]
B =
[ L0 + Ls0 + Ls2*cos(2*x), Ls2*cos(2*x - (2*pi)/3) - Ls0/2, Ls2*cos((2*pi)/3 + 2*x) - Ls0/2]
[ Ls2*cos(2*x - (2*pi)/3) - Ls0/2, L0 + Ls0 + Ls2*cos((2*pi)/3 + 2*x), Ls2*cos(2*x) - Ls0/2]
[ Ls2*cos((2*pi)/3 + 2*x) - Ls0/2, Ls2*cos(2*x) - Ls0/2, L0 + Ls0 + Ls2*cos(2*x - (2*pi)/3)]
C =
[ (2^(1/2)*3^(1/2)*cos(x))/3, -(2^(1/2)*3^(1/2)*sin(x))/3, 3^(1/2)/3]
[ (2^(1/2)*3^(1/2)*cos(x - (2*pi)/3))/3, -(2^(1/2)*3^(1/2)*sin(x - (2*pi)/3))/3, 3^(1/2)/3]
[ (2^(1/2)*3^(1/2)*cos((2*pi)/3 + x))/3, -(2^(1/2)*3^(1/2)*sin((2*pi)/3 + x))/3, 3^(1/2)/3]
求A*B*C,按书上的例子这个计算结果是一个斜矩阵,手工算太麻烦了,求高手指点? 这是书上的计算结果 - (2^(1/2)*3^(1/2)*cos(x)*((2^(1/2)*3^(1/2)*cos(x - (2*pi)/3)*(Ls0/2 - Ls2*cos(2*x - (2*pi)/3)))/3 + (2^(1/2)*3^(1/2)*cos((2*pi)/3 + x)*(Ls0/2 - Ls2*cos((2*pi)/3 + 2*x)))/3 - (2^(1/2)*3^(1/2)*cos(x)*(L0 + Ls0 + Ls2*cos(2*x)))/3))/3 - (2^(1/2)*3^(1/2)*cos(x - (2*pi)/3)*((2^(1/2)*3^(1/2)*cos(x)*(Ls0/2 - Ls2*cos(2*x - (2*pi)/3)))/3 - (2^(1/2)*3^(1/2)*cos(x - (2*pi)/3)*(L0 + Ls0 + Ls2*cos((2*pi)/3 + 2*x)))/3 + (2^(1/2)*3^(1/2)*cos((2*pi)/3 + x)*(Ls0/2 - Ls2*cos(2*x)))/3))/3 - (2^(1/2)*3^(1/2)*cos((2*pi)/3 + x)*((2^(1/2)*3^(1/2)*cos(x)*(Ls0/2 - Ls2*cos((2*pi)/3 + 2*x)))/3 - (2^(1/2)*3^(1/2)*cos((2*pi)/3 + x)*(L0 + Ls0 + Ls2*cos(2*x - (2*pi)/3)))/3 + (2^(1/2)*3^(1/2)*cos(x - (2*pi)/3)*(Ls0/2 - Ls2*cos(2*x)))/3))/3 上面是计算结果中的1项,为什么MATLAB不会自己化繁就简呢?{:soso_e135:} 听说collect函数可以解决? 本帖最后由 yjhou 于 2012-11-19 16:52 编辑
MATLAB可以直接乘的啊
自己解决了,要用到=simple(s)函数 俺也不知道!!!!!!!!!
页:
[1]