SegmentsLumbar.PelvisSeg.r0 = {JointPos.PelvisPosX,JointPos.PelvisPosY,JointPos.PelvisPosZ} - SegmentsLumbar.PelvisSeg.AnatomicalFrame.sRel*SegmentsLumbar.PelvisSeg.Axes0'; #ifdef PelvisRotMat SegmentsLumbar.PelvisSeg.Axes0= JointPos.PelvisRotMatrix* SegmentsLumbar.PelvisSeg.AnatomicalFrameTrunk.ARel'; #else SegmentsLumbar.PelvisSeg.Axes0= RotMat((pi/180)*JointPos.PelvisRotZ ,z)* RotMat((pi/180)*JointPos.PelvisRotY ,y)* RotMat((pi/180)*JointPos.PelvisRotX ,x)* SegmentsLumbar.PelvisSeg.AnatomicalFrameTrunk.ARel'; #endif