e3x.nn.functions.window.rectangular_window

e3x.nn.functions.window.rectangular_window(x, num, limit=1.0)[source]

Rectangular window basis functions.

Computes the basis functions

\[\begin{split}\mathrm{rectangular\_window}_k(x) = \begin{cases} 0, & x < \frac{k l}{K}\\ 1, & \frac{k l}{K+1} \le x \le \frac{(k+1) l}{K} \\ 0, & x > \frac{(k+1) l}{K} \end{cases}\end{split}\]

where \(k=0 \dots K-1\) with \(K\) = num and \(l\) = limit. Plot for \(K = 5\) and \(l = 1\):

../_images/e3x.nn.functions.window.rectangular_window_0_0.svg
Parameters:
Return type:

<class 'Float[Array, '... num']'>

Returns:

Value of all basis functions for all values in x. The output shape follows the input, with an additional dimension of size num appended.