function cams = rotatmatrix(cams)

for i=1:size(cams,2)
    
        Rx=rotationmat3D(cams(i).angles(1),[1,0,0]);
        Ry=rotationmat3D(cams(i).angles(2),[0,1,0]);
        Rz=rotationmat3D(cams(i).angles(3),[0,0,1]);
        R_cam=Rz*Ry*Rx;
        
        cams(i).rotationmat=R_cam;
        
end