clc clf clear all sx=24 sy=36 txy=2 angle=0:1:180; s=sind(angle); c=cosd(angle); s1=sx.*c.^2+sy.*s.^2+2*s.*c.*txy; s2=sx.*s.^2+sy.*c.^2-2*s.*c.*txy; t12=-s.*c.*sx+s.*c.*sy+(c.^2-s.^2).*txy; for i=1:1:length(angle) zeroline=0 end figure(1) hold on plot(angle,s1,'r-','LineWidth',3) plot(angle,s2,'b-','LineWidth',3) plot(angle,t12,'g-','LineWidth',3) plot(angle,zeroline,'b-','LineWidth',3) legend('s1','s2','t12') hold off