Guest User

Untitled

a guest
Oct 27th, 2016
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. f[x_] := 2 t /; 0 <= t < T/2;
  2. f[x_] := 2 - 2 t /; t/2 <= t < T;
  3. (*PERIOD*)T := 1;
  4. Plot[f[x], {t, 0, T}];
  5.  
  6. (*this is the part were if I increase the fundamental period to be plotted I have an error "Iteration limit of 4096 exceeded."*)
  7. f[x_] := f[t - T] /; t > T;
  8. f[x_] := f[t + T] /; t < 0
  9. T := 1;
  10. Plot[f[x], {t, -T, T}]}
  11.  
  12. Clear[f]
  13. f[t_, T_] /; Mod[t, T] <= T/2 := 2 Mod[t, T]
  14. f[t_, T_] := 2 - 2 Mod[t, T]
  15.  
  16. With[{T = 1}, Plot[f[t, T], {t, -2 T, 2 T}]]
Add Comment
Please, Sign In to add comment