close all

% Nacteni parametru
run ../../parametry.m

% Pocatecni podminky
th1i=1;
th2i=-1;

%open('doublePendulumSim_model_overeniRovnic.slx')

tf=4;
%testovane casove kroky
dtV=[0.01 0.005 0.002 0.001 0.0005 0.0002 0.0001];
for i=1:length(dtV)
    dt=dtV(i);
    sim('doublePendulumSim_model_overeniRovnic.slx')

    %vizualizace
    semilogy(odchylka.Time,odchylka.Data)
    hold on
    log.odchylka(i)=odchylka;
end

legend('$dt=0.01 s$','$dt=0.005 s$','$dt=0.002 s$','$dt=0.001 s$','$dt=0.0005 s$','$dt=0.0002 s$','$dt=0.0001 s$','Location','SouthEast')
odchylka.Data(end)