Update: I am trying to multiply the rotation matrices in order to rotate the vectors relative to each joint's relative axis. This link shows how to transform matrices Transformation Matrices. I am attempting to do this from the second joint (rotm2) to the base (rotmbase). If anyone has any experience with rotation matrices I would love any input!
eulbase = [deg2rad(0) deg2rad(-9.607748) deg2rad(-3.075402)];
rotmbase = eul2rotm(eulbase, 'XYZ');
eul1 = [deg2rad(-0.0126580) deg2rad(0.572242) deg2rad(-0.074901)];
rotm1 = eul2rotm(eul1, 'XYZ');
eul2 = [deg2rad(-4.340429) deg2rad(1.83644) deg2rad(-28.632479)];
rotm2 = eul2rotm(eul2, 'XYZ');
Rbase1 = transpose(rotmbase)*rotm1;
R12 = transpose(rotm1)*rotm2;
Rbase2 = R12*Rbase1;
vectorbase = [-11.685307 7.564209 17.163254];
vectorbaseR = transpose(vectorbase);
indexbase = rotmbase * vectorbaseR;