function R = transform_matrix(DH)
    R=eye(4);
for n=1:size(DH,1)

    Rt=rotz(deg2rad(DH(n,1)))*trans(DH(n,3),0,DH(n,4))*rotx(deg2rad(DH(n,2)));
    R = R * Rt;
end
end