+200 votes
in Amplitude by
edited by

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
+96 votes
by

The equation of a triangular wave can be represented as a piecewise function. In this case, with an amplitude of 2 and a time period of 2, the equation can be defined as follows:

f(t) = 2 * (t - 2 * floor((t + 1) / 2)) * (-1)^(floor((t + 1) / 2))

Let me break down the equation for you:

  • t represents the time variable.
  • floor(x) denotes the largest integer that is less than or equal to x.
  • The term (t + 1) / 2 ensures that the wave repeats every 2 units of time.
  • The function (-1)^(floor((t + 1) / 2)) generates alternating signs (+1 and -1) for the ascending and descending sections of the wave.
  • The term t - 2 * floor((t + 1) / 2) maps the time domain to the range [-1, 1], where the wave changes direction at integer values of t.

By multiplying this term by 2, we obtain the desired amplitude of 2 for the triangular wave.

Please note that this equation assumes the wave starts at t = 0. If you need to shift the wave horizontally, you can add a constant term inside the floor function or adjust the equation accordingly.

Welcome to Physicsgurus Q&A, where you can ask questions and receive answers from other members of the community.
...