.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/20_tutorials/tutorial02_discretization5.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_20_tutorials_tutorial02_discretization5.py: Tutorial - Discretization Heuristic II ====================================== TODO - work in progress .. GENERATED FROM PYTHON SOURCE LINES 10-35 .. code-block:: Python import numpy as np # Create RDDE matrix representation E = np.eye(4) A0 = np.array([[-1, 0, 0, 0], [0, 1, 0, 0], [0, 0, -10, -4], [0, 0, 4, -10]]) A1 = np.array([[3, 3, 3, 3], [0, -1.5, 0, 0], [0, 0, 3, -5], [0, 5, 5, 5]]) A = np.stack([A0, A1], axis=2) # This stacking along 3rd dimension is done automatically when using high level interface, it is for leveraging vectorization hA = np.array([0, 1.]) shift = 0 hmax = hA[-1] hK = hA / hmax K = A * np.exp(-shift * hmax * hA) K[:,:,0] -= E * shift * hmax # Note, in the case of neutral system, it is essential to check that half-plane # defined by `r` indeed contains finitely many roots, i.e. :math:`\gamma(r) < 1`. .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.001 seconds) .. _sphx_glr_download_auto_examples_20_tutorials_tutorial02_discretization5.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: tutorial02_discretization5.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: tutorial02_discretization5.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: tutorial02_discretization5.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_