MATLAB: How to insert two matrices into a matrix

exportmatrixmatrix manipulationmultiple

I would like to insert my matrices: R, R' and t,t' into an identity 4×4 matrix.
Then I would like to multiple them and as a result store from the final 4×4 matrix just the R^(3×3) and t^(3×1) matrices.
Thank you in advance for your help!

Best Answer

I = eye(4) ;
R = rand(3) ;
t = rand(3,1) ;
I(1:3,1:3) = R ;
I(1:3,4) = t ;
or
I = eye(4) ;
R = rand(3) ;
t = rand(3,1) ;
I(1:3,1:4) = [R t]
Related Question