Last active
February 19, 2018 01:54
-
-
Save jdelacruz26/0d5ff0b907ee2d48f5c6d0a34d14049d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global L m P k c | |
k=100; | |
c=0.4; | |
m=0.3; | |
L=1; | |
P=99; | |
t=0:0.01:20; | |
y=[0.01 0 0 0]; | |
[t,q]=ode45(@derivadanolin,t,y); | |
figure(1) | |
subplot(2,1,1) | |
plot(t,q(:,1),'LineWidth',1) | |
grid on | |
set(xlabel('$Tiempo(seg)$'),'interpreter','latex','fontsize',14) | |
set(ylabel('$\varphi _1(rad)$'),'interpreter','latex','fontsize',14) | |
title('Respuesta sistema linealizado','fontsize',16) | |
subplot(2,1,2) | |
plot(t,q(:,2),'LineWidth',1) | |
grid on | |
set(xlabel('$Tiempo(seg)$'),'interpreter','latex','fontsize',14) | |
set(ylabel('$\varphi _2(rad)$'),'interpreter','latex','fontsize',14) | |
title('Respuesta sistema linealizado','fontsize',16) | |
figure(2) | |
subplot(1,2,1) | |
plot(q(:,1),q(:,3),'LineWidth',1) | |
grid on | |
set(xlabel('$x_1$'),'interpreter','latex','fontsize',14) | |
set(ylabel('$x_3$'),'interpreter','latex','fontsize',14) | |
title('Diagrama de fase','fontsize',16) | |
subplot(1,2,2) | |
plot(q(:,2),q(:,4),'LineWidth',1) | |
grid on | |
set(xlabel('$x_2$'),'interpreter','latex','fontsize',14) | |
set(ylabel('$x_4$'),'interpreter','latex','fontsize',14) | |
title('Diagrama de fase','fontsize',16) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment