Advertisement
Guest User

Untitled

a guest
Aug 24th, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. fTmp[t_ /; 0 <= t <= 2] := [Piecewise] {
  2. {1, t <= 1},
  3. {0, t <= 2}
  4. }
  5. f[t_] := fTmp[Mod[t, 2]]
  6.  
  7. Plot[f[t], {t, 0, 5}]
  8.  
  9. NDSolve[{a'[t] == f[t]*a[t], a[0] == 1}, a, {t, 0, 5}]
  10. ... NDSolve::nlnum: The function value {2.71828 fTmp[2.18952]} is not a list of numbers with dimensions {1} at {t,a[t],NDSolve`s$49306[t]} = {2.18952,2.71828,1}.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement