Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- funcprot(0)
- function dxdt=fu(t,x,m,A1,A2,K1,K2)
- dxdt=zeros(4,1);
- dxdt(1)=x(2);
- dxdt(2)=1/m(x(3)*A1-x(4)*A2);
- dxdt(3)=K1*t;
- dxdt(4)=K2*t;
- endfunction
- r1=0.03;
- r2=0.02;
- pi=3.141562;
- A1=pi*r1^2;
- A2=A1-(pi*r2^2);
- K1=5000;
- K2=10000;
- m=450;
- x0=0;
- t0=0.1;
- t=0.1:0.001:5;
- sol = ode(x0,t0,t,fu)
- plot(t,sol)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement