Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. pi = 3.14;
  2. y = @(x) (50*pi*x) .* (0<x & x<1/150) + (pi/3) .* ((1/150<=x) & (x<=3001/150)) + ((3002*pi/3-50*pi*x) .* ((3001/150 <= x) & (x < 1501/75)));%r(t)
  3. x = 0:(1/150):(1501/75);
  4. eqn ='0.7274 * v = 0.00072*D3y + 0.07206*D2y + 0.44244*Dy';
  5. inits = 'y(0)=0, Dy(0) = 0, Dy(0.01) = 50';
  6. v=dsolve(eqn,inits,'x');
  7. z=eval(vectorize(v));
  8. plot(x,v,'g'),grid on
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement