Tporuch = 0.5
Tvyppor = 0.6
Tkonec = 2.0
Jm = 10000.0

f1kc = @(t,y) [y(2)
               -DeltaP(y(1), t, Tporuch, Tvyppor, Pmax1, Pmax2, Pmax3, Pt)/omega/Jm];
[t,y] = ode23(f1kc, 0 : 0.0001 : Tkonec, [Theta0c 0]);

ThetaT=y(:,1);
DeltaOmegaT=y(:,2);
plot(t,ThetaT,t,DeltaOmegaT);
xlabel('Cas (s)'); 
ylabel('Theta (rad), DeltaOmega (rad/s)');
legend('Theta (rad)','DeltaOmega (rad/s)');
title('Prubeh zatezneho uhlu a rozdilove uhlove rychlosti'); 
grid on;
