nass-simscape/stewart-simscape/getJacobianMatrix.m
2018-06-04 09:21:24 +02:00

19 lines
417 B
Mathematica

function J = getJacobianMatrix(RM,M_pos_base)
J = zeros(6);
J(:, 1:3) = RM;
for i = 1:6
J(i, 4:6) = -RM(i, :)*getCrossProductMatrix(M_pos_base(i, :));
end
function M = getCrossProductMatrix(v)
M = zeros(3);
M(1, 2) = -v(3);
M(1, 3) = v(2);
M(2, 3) = -v(1);
M(2, 1) = -M(1, 2);
M(3, 1) = -M(1, 3);
M(3, 2) = -M(2, 3);
end
end