Discrete-Time Function Plotter
The sliders modify each sequence as \(a \cdot f[\frac 1 w \cdot (k - s)]\) based on the discrete time index \(k\in\mathbb{Z}\). The shift \(s\) adds an offset to the time index, the amplitude \(a\) scales the values, and the width \(w\) streches or compresses the signal along time.
The rectangle and triangle functions are defined as: $$\mathrm{rect}_N[k] = \begin{cases} 1,& 0 \leq k \leq N-1 \\ 0,& \text{else} \end{cases}$$ $$\mathrm{tri}_N[k] = \begin{cases} N - |k|,& |k| \leq N \\ 0,&\text{else} \end{cases}$$
Hint: any valid expression using \(k\) works here — try something like
(k/4)**2 to see its samples.