Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fTmp[t_ /; 0 <= t <= 2] := [Piecewise] {
- {1, t <= 1},
- {0, t <= 2}
- }
- f[t_] := fTmp[Mod[t, 2]]
- Plot[f[t], {t, 0, 5}]
- NDSolve[{a'[t] == f[t]*a[t], a[0] == 1}, a, {t, 0, 5}]
- ... 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