How to find the rotation matrix between two coordinate systems?

Hello,

I have an assembly in SolidWorks. I have also defined coordinate systems (CS) for each of the parts as CS1, CS2 etc. Is it possible to find out the rotation matrix between CS1 and CS2 when I rotate the parts?

SolidworksAssemblies