Demo entry 6659839

err

   

Submitted by anonymous on Nov 12, 2017 at 18:53
Language: Matlab. Code size: 919 Bytes.

%%
err=0;
for iii=1:N;
    % D-H table[theta alpha ai di]
    DHi = [theta(iii,1)   -pi/2   0   Dbs;...
           theta(iii,2)    pi/2   0   0;...
           theta(iii,3)   -pi/2   0   Dse;...
           theta(iii,4)    pi/2   0   0;...
           theta(iii,5)   -pi/2   0   Dew;...
           theta(iii,6)    pi/2   0   0;...
           theta(iii,7)    0      0   Dwt];
    
    T1 = T_matrix(DHi(1,1),DHi(1,2),DHi(1,3),DHi(1,4));
    T2 = T_matrix(DHi(2,1),DHi(2,2),DHi(2,3),DHi(2,4));
    T3 = T_matrix(DHi(3,1),DHi(3,2),DHi(3,3),DHi(3,4));
    T4 = T_matrix(DHi(4,1),DHi(4,2),DHi(4,3),DHi(4,4));
    T5 = T_matrix(DHi(5,1),DHi(5,2),DHi(5,3),DHi(5,4));
    T6 = T_matrix(DHi(6,1),DHi(6,2),DHi(6,3),DHi(6,4));
    T7 = T_matrix(DHi(7,1),DHi(7,2),DHi(7,3),DHi(7,4));
    
    H_check=T1*T2*T3*T4*T5*T6*T7;
    Check=H_check-Htip;
    err=err+sum(sum(Check));
end
disp(['error=',num2str(err)]);

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).