Está en la página 1de 2

clc;

clear all;
close all;
format short
ti=0;
h=0.0025;
tf=10;
ts=ti:h:tf;
opciones=odeset('RelTol',1e-3,'InitialStep',2.5e-3,'MaxStep',2.5e-3);
[t,x]=ode45('centrifuga',ts,[0;0],opciones);
%plot(t,x(:,1),t,x(:,2))
plot(t,x(:,1))
function xp=centrifuga(t,x)
m1=5;
lc2=0.01;
delta=45*pi/180;
Lsm=0.08;
b1=0.12;
fc1=0.11;
fe1=0.09;
q1=x(1);
qp1=x(2);
tau=2*sin(t);
qpp1=(tau-b1*qp1-fc1*sign(qp1)-fe1*(1-abs(sign(qp1))))/
(m1*lc2*lc2*cos(delta)+Lsm);
xp=[qp1;qpp1];
end

También podría gustarte