“…The program utilizes the ode45 solver to simulate the response of the overall system combining the controller and the controlled system. (6); Jt = [p.J(1,1);p.J(1,2);p.J(1,3);p.J(2,2);p.J(2,3);p.J(3,3)]; % time tfinal = 5; deltat = 0.001; t = 0:deltat:tfinal;% for evaluating solution % solve the ODE z0 = [1 0 0 0 0 0 0 0.08 0.08 0.04 1.06 0.21 0.31 1.90 0.41 1.15]'; options = odeset('absTol',1e-10,'relTol',1e-10); % The simulation for the general version of modified learning method [t_dai, z_dai] = ode45(@(t,z)deterministic_artificial_intelligence_modified_general(t,z,p), t, z0, options); % The simulation for the specific version of modified learning method [t_dmd, z_dmd] = ode45(@(t,z)deterministi_artificia_intelligence_modified_specific(t,z,p), t, z0, options); % The simulation for the original version of learning method [t_dor, z_dor] = ode45(@(t,z)deterministic_artificial_intelligence_original(t,z,p), t, [z0;0;0;0], options); %% Plot parameter estimations and state trajectories figure() plot(t_dai, z_dai(:,11),t_dai, z_dai(:, 14) 2) th(3); th(2) th( 4) th(5); th(3) th( 5) th( 6)]; % generate trajectory [sdwd,sddwd] = traj_gen(t,wd,p); % generate feed forward control torque tau = Jh*sdwd + cross(wd', Jh*wd)'; % update the dynamic of the system dw = p.J\(tau-cross(w', p.J*w)'); dq = 0.5*quatmultiply([0 w'],q'); % update the parameter estimation ddw = [0;0;0]; Pd = p.P(wd(1),wd(2),wd(3),sdwd(1),sdwd(2),sdwd(3),sddwd(1),sddwd(2),sddwd(3)); P = p.P(w(1),w(2),w(3),dw(1),dw(2),dw(3),0,0,0); dP = p.dP(w(1),w(2),w(3),dw(1),dw(2),dw(3),ddw(1),ddw(2),ddw…”