Use JavaScript to define functions and see the discrete time convolution. This is a very scrappy, buggy tool, but it has proved helpful Furthermore, the convolution is not mathematically correct, it is just a numerical approximation. Code is on Github: https://github.com/wyatt/conv_vis
Made by Wyatt Sell
u(x) - Unit step functionimpulse(x, center_x?) - Dirac impulse centeredat
center_xrect(x, width?, center_x?) - Rectangle function centered
at center_x with widthMath.sin(x), Math.cos(x),
Math.exp(x), etc.
x => Math.sin(x) * u(x) - Sine wave for x≥0x => {
if (Math.abs(x) < 3) {
return 1;
} else {
return 0;
}
}
- JavaScript syntax for a piecewise function