Skip to content

Instantly share code, notes, and snippets.

@matoushybl
Created April 22, 2017 15:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matoushybl/94ded40cdc7b0ec8f10379aeaa3831a2 to your computer and use it in GitHub Desktop.
Save matoushybl/94ded40cdc7b0ec8f10379aeaa3831a2 to your computer and use it in GitHub Desktop.
K=0.9;
m=1;
g=9.81;
T=100;
sim('obdelnik')
E(end)
sim('obdelnik2periody')
sim('dif1')
sim('dif2')
figure
plot(obdelnikovySignal.time, obdelnikovySignal.signals.values)
title('2 periody obdelnikoveho signalu')
xlabel('cas t [s]')
ylabel('y [-]')
figure
subplot(2,1, 1)
plot(dif1.time, dif1.signals.values, '--')
title('Diferencialni rovnice1')
xlabel('cas t [s]')
ylabel('y [-]')
subplot(2, 1, 2)
plot(dif2.time, dif2.signals.values, 'x')
title('Diferencialni rovnice2')
xlabel('cas t [s]')
ylabel('y [-]')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment