matalab三角函数矩阵运算
A=[cos(x)*cos(y) cos(x)*cos(y) -sin(x)
-sin(y) cos(y) 0
sin(x)*sin(y) sin(x)*sin(y) cos(x) ]
B=[m 0 0
0 n 0
0 0 s] 如何用MATLAB计算矩阵A*b啊,
不可以呢总出错
A=[cos(x)*cos(y) cos(x)*cos(y) -sin(x)
-sin(y) cos(y) 0
sin(x)*sin(y) sin(x)*sin(y) cos(x) ]
B=[m 0 0
0 n 0
0 0 s]
C=A*B
Error using ==> mtimes
Inner matrix dimensions must agree.出现这样的错误出现这样的错误
人气:317 ℃ 时间:2020-04-01 09:07:27
解答
A=[cos(x)*cos(y) cos(x)*cos(y) -sin(x)
-sin(y) cos(y) 0
sin(x)*sin(y) sin(x)*sin(y) cos(x) ]
B=[m 0 0
0 n 0
0 0 s]
C=A*B
C=
直接输入就行啦,有问题吗?
推荐
猜你喜欢