%CMalpha_vett=CMalpha_vett(1:8);

% Diagramma di stabilità
% figure(1)
% yyaxis left
% ylabel('-RE(\lambda_{SP})')
% axis([min(abs(CMalpha_vett)) inf 0 5])
% plot(-CMalpha_vett, -autovalRe(1,:));
% hold on
% yyaxis right
% ylabel('-RE(\lambda_{PH})')
% axis([min(abs(CMalpha_vett)) inf 0 0.25])
% plot(-CMalpha_vett, -autovalRe(3,:));
% xlabel('-CM_{\alpha}')
% 
% figure(2)
% yyaxis left
% ylabel('IM(\lambda_{SP})')
% axis([min(abs(CMalpha_vett)) inf 0 10])
% plot(-CMalpha_vett, abs(autovalIm(1,:)));
% hold on
% yyaxis right
% ylabel('-IM(\lambda_{PH})')
% axis([min(abs(CMalpha_vett)) inf 0 1])
% plot(-CMalpha_vett, abs(autovalIm(3,:)));
% xlabel('-CM_{\alpha}')

%Root locus

figure(3)
grid on
plot(autovalRe(1,:), autovalIm(1,:), '*r');
hold on
plot(autovalRe(3,:), autovalIm(3,:), '*r');
plot(autovalRe(2,:), autovalIm(2,:), '*r');
plot(autovalRe(4,:), autovalIm(4,:), '*r');
hold on
plot(autovalRe1(1,:), autovalIm1(1,:), '*b');
plot(autovalRe1(3,:), autovalIm1(3,:), '*b');
plot(autovalRe1(2,:), autovalIm1(2,:), '*b');
plot(autovalRe1(4,:), autovalIm1(4,:), '*b');
xlabel('Re[s^{-1}]')
ylabel('Im[s^{-1}]')
grid on





