www.gusucode.com > matlab编程求解机器人的正逆解 采用遗传算法对机器人进行路径规划源码程序 > code/基本代码/transform.m
syms theta1; syms theta2; syms theta3; syms theta4; syms theta5; syms theta6; syms theta7; Theta = cell(1,7); digits(3) Theta{1} = CD_Trans(0,0.25,theta1,pi/2); Theta{2} = CD_Trans(0,0.25,theta2,pi/2); Theta{3} = CD_Trans(2.5,0.25,theta3,0); Theta{4} = CD_Trans(2.5,0.25,theta4,0); Theta{5} = CD_Trans(0,0.25,theta5,pi/2); Theta{6} = CD_Trans(0,0.25,theta6,pi/2); Theta{7} = CD_Trans(0,0.25,theta7,pi/2); Transform = eye(4); for i=1:7 Transform = Transform*Theta{i}; Theta{i} = vpa(Theta{i},2); end Transform = vpa(Transform,2);