matlab solve 矩阵方程,用solve函数能求解带有未知数的矩阵方程组吗

检查时发现上述程序输入时有点小错误:L,改后为:

syms theta1 theta2 theta3 d2;

a=[cos(theta1) -sin(theta1)*cosd(78) sin(theta1)*sind(78) 100*cos(theta1);sin(theta1) cos(theta1)*cosd(78) -cos(theta1)*sind(78) 100*sin(theta1);0 sind(78) cosd(78) 0;0 0 0 1];

b=[cos(theta2) -sin(theta2)*cosd(-45) sin(theta2)*sind(-45) 10*cos(theta2);sin(theta2) cos(theta2)*cosd(-45) -cos(theta2)*sind(-45) 10*sin(theta2);0 sind(-45) cosd(-45) d2;0 0 0 1];

c=[cos(theta3) -sin(theta3)*cosd(97) sin(theta3)*sind(97) 150*cos(theta3);sin(theta3) cos(theta3)*cosd(97) -cos(theta3)*sind(97) 150*sin(theta3);0 sind(97) cosd(97) 180;0 0 0 1];

P=[0 0 1;0 0 0;40 1 0;1 0 0];

A=a*b*c;

R=A*P;

H=R-[260.188 -9.83535 98.7370;-0.225849 0.390972 0.892263;0.163272 -0.88778 0.430335;1 0 0];

[theta1,theta2,theta3,d2]=solve(H(1,1),H(3,1),H(3,2),H(3,3));

theta1=double(theta1)

theta2=double(theta2)

theta3=double(theta3)

d2=double(d2)

theta1 =

-419.1482

-419.1482

-326.5611

-326.5611

-137.2703

-137.2703

-47.2336

-47.2336

theta2 =

-1.1270 + 0.6609i

-1.1270 - 0.6609i

0.1811

-1.7333

0.8236 - 1.3005i

0.8236 + 1.3005i

0.6056

-0.7136

theta3 =

1.3917

1.3917

-1.3917

-1.3917

1.8655

1.8655

-1.8655

-1.8655

d2 =

-1.1321

-1.1321

2.0589

2.0589

-1.4811

-1.4811

2.3722

2.3722

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值