早教吧 育儿知识 作业答案 考试题库 百科 知识分享

matalab三角函数矩阵运算A=[cos(x)*cos(y)cos(x)*cos(y)-sin(x)-sin(y)cos(y)0sin(x)*sin(y)sin(x)*sin(y)cos(x)]B=[m000n000s]如何用MATLAB计算矩阵A*b啊,不可以呢总出错A=[cos(x)*cos(y)cos(x)*cos(y)-sin(x)-sin(y)cos(y)0

题目详情
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.出现这样的错误出现这样的错误
▼优质解答
答案和解析
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=
直接输入就行啦,有问题吗?