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

该博客介绍了如何使用MATLAB的`solve`函数来解决包含多个未知数的矩阵方程组。通过示例展示了如何定义符号变量,构建矩阵,并最终求解得到theta1、theta2、theta3和d2的值。计算结果显示了不同解的情况。
摘要由CSDN通过智能技术生成

检查时发现上述程序输入时有点小错误: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)

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值