{
  "cells": [
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "%matplotlib inline"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "\n# Monocomponent Nonstationary Signal with Constant Frequency Modulation and One-Sided Exponential Amplitude Modulation\n\nGenerate a monocomponent nonstationary signal with constant frequency\nmodulation and one-sided exponential amplitude modulation.\n\nFigure 2.7 from the tutorial.\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "from tftb.generators import fmconst, amexpos\nimport matplotlib.pyplot as plt\nfrom numpy import real\n\nfm, _ = fmconst(256, 0.2)\nam = amexpos(256, 100, kind='unilateral')\nsignal = am * fm\n\nplt.plot(real(signal))\nplt.xlabel('Time')\nplt.ylabel('Real part')\nplt.title('Constant Frequency, One-sided Exponential Amplitude')\nplt.xlim(0, 256)\nplt.grid()\nplt.show()"
      ]
    }
  ],
  "metadata": {
    "kernelspec": {
      "display_name": "Python 3",
      "language": "python",
      "name": "python3"
    },
    "language_info": {
      "codemirror_mode": {
        "name": "ipython",
        "version": 3
      },
      "file_extension": ".py",
      "mimetype": "text/x-python",
      "name": "python",
      "nbconvert_exporter": "python",
      "pygments_lexer": "ipython3",
      "version": "3.7.9"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 0
}