% M-file to calculate dicrection cosine matrices % for stress transformations %axpx = cos(x'x) = cos(thetap - theta) %axpy = cos(x'y) = sin(x'x) = sin(thetap - theta) %aypx = cos(y'x) = -sin(x'x) %aypy = cos(y'y) = cos(x'x) % cos(A-B) = cosA*cosB + sinA*sinB % sin(A-B) = sinA*cosB - cosA*sinB %axpx = COSB*(COSB') + SINB*(SINB'); %axpy = COSB*(COSB') + SINB*(SINB'); %aypx = -aypx; %aypy = axpx; SINNB = SINB*(ones(1,NUM)); COSSB = COSB*(ones(1,NUM)); SINN2B = SIN2B*(ones(1,NUM)); COSS2B = COS2B*(ones(1,NUM)); SINNB2 = SINB2*(ones(1,NUM)); COSSB2 = COSB2*(ones(1,NUM));