clc;
clear;
close all;

ModelName='sim28';

Tf=num2str(50);

L=5;
C=1;
ZETA=[2 1 0.3 0];

for i=1:numel(ZETA)
    zeta=ZETA(i);
    R=2*zeta*sqrt(L/C);
    
    out=sim(ModelName,'StopTime',Tf);
    t=out.get('tout');
    simout=out.get('simout');
    ydot=simout(:,1);
    y=simout(:,2);
    
    figure(1);
    subplot(2,2,i);
    plot(y,ydot);
    xlabel('y');
    ylabel('ydot');
    grid on;
    
    figure(2);
    plot(t,y);
    hold on;
    xlabel('t');
    ylabel('y');
    
end
