{
    "nbformat": 4,
    "nbformat_minor": 5,
    "metadata": {
        "kernelspec": {
            "display_name": "Python",
            "language": "python",
            "name": "python"
        },
        "language_info": {
            "name": "python"
        }
    },
    "cells": [
        {
            "id": "b206099c",
            "cell_type": "markdown",
            "source": "<div class='alert alert-warning'>\n\nSciPy's interactive examples with Jupyterlite are experimental and may not always work as expected. Execution of cells containing imports may result in large downloads (up to 60MB of content for the first import from SciPy). Load times when importing from SciPy may take roughly 10-20 seconds. If you notice any problems, feel free to open an [issue](https://github.com/scipy/scipy/issues/new/choose).\n\n</div>",
            "metadata": {}
        },
        {
            "id": "b5035c84",
            "cell_type": "markdown",
            "source": "The following example illustrates how to create a digital Butterworth filer and\nplot its step response:\n",
            "metadata": {}
        },
        {
            "id": "cf753e5f",
            "cell_type": "code",
            "metadata": {},
            "execution_count": null,
            "source": "import numpy as np\nfrom scipy import signal\nimport matplotlib.pyplot as plt\n\ndt = 1  # sampling interval is one => time unit is sample number\nbb, aa = signal.butter(3, 0.25, fs=1/dt)\nt, y = signal.dstep((bb, aa, dt), n=25)\n\nfig0, ax0 = plt.subplots()\nax0.step(t, np.squeeze(y), '.-', where='post')\nax0.set_title(r\"Step Response of a $3^\\text{rd}$ Order Butterworth Filter\")\nax0.set(xlabel='Sample number', ylabel='Amplitude', ylim=(0, 1.1*np.max(y)))\nax0.grid()\nplt.show()",
            "outputs": []
        }
    ]
}