牛顿法求解Stewart平台运动学正解

function Newton()format longx0=[0;0;20;0;0;0];x1=x0-inv(myJacobi(x0))*myfun(x0);while norm(x1-x0)>1e-3 x0=x1; x1=x0-inv(myJacobi(x0))*myfun(x0);endx1endfunction f=myfun(x)syms x...
摘要由CSDN通过智能技术生成
function  Newton()
format long
x0=[0;0;20;0;0;0];
x1=x0-inv(myJacobi(x0))*myfun(x0);
while norm(x1-x0)>1e-3
    x0=x1;
    x1=x0-inv(myJacobi(x0))*myfun(x0);
end
x1
end

function f=myfun(x)
syms x1 x2 x3 a b g
X=[x1;x2;x3];
RX=[1 0 0;0 cos(a) -sin(a);0 sin(a) cos(a)];
RY=[cos(b) 0 sin(b);0 1 0;-sin(b) 0 cos(b)];
RZ=[cos(g) -sin(g) 0;sin(g) cos(g) 0; 0 0 1];
R=RZ*RY*RX;
p1=[12;-2;0];
p2=[12;2;0];
p3=[-4.26794919;11.39230485;0];
p4=[-7.73205081;9.39230485;0];
p5=[-7.73205081;-9.39230485;0];
p6=[-4.26794919;-11.39230485;0];
r1=[12;-14;5];
r2=[12;14;5];
r3=[6.12435565;17.39230485;5];
r4=[-18.12435565;3.39230485;5];
r5=[-18.12435565;-3.39230485;5];
r6=[6.12435565;-17.39230485;5];
l1=20;
l2=25;
l3=26;
l4=20;
l5=20;
l6=20;
f1=(norm(X+R*p1-r1))^2-l1^2;
f2=(norm(X+R*p2-r2))^2-l2^2;
f3=(norm(X+R*p3-r3))^2-l3^2;
f4=(norm(X+R*p4-r
  • 6
    点赞
  • 50
    收藏
    觉得还不错? 一键收藏
  • 9
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值