1function g_inv = calculateTransformationInverse(g) 2%#codegen 3 4R = g(1:3,1:3); 5p = g(1:3,4); 6 7g_inv = [R', -R'*p; zeros(1,3), 1]; 8 9end