diff --git a/doc-src/index.rst b/doc-src/index.rst index 54b6f5f..de09541 100644 --- a/doc-src/index.rst +++ b/doc-src/index.rst @@ -8,6 +8,7 @@ Contents: install python/python + octave/octave Indices and tables diff --git a/doc-src/install.rst b/doc-src/install.rst index e6845cd..aeb6396 100644 --- a/doc-src/install.rst +++ b/doc-src/install.rst @@ -33,11 +33,11 @@ Requirements sudo apt-get install gengetopt help2man groff pod2pdf bison flex libhpdf-dev libtool -- **Optional**: For the python_ interface, python3 with matplotlib, cython and h5py is required: +- **Optional**: For the python_ interface, python with numpy, matplotlib, cython and h5py is required: .. code-block:: console - sudo pip3 install matplotlib cython h5py + sudo pip install numpy matplotlib cython h5py Clone, build and install ------------------------ @@ -50,25 +50,18 @@ Clone, build and install cd openEMS-Project ./update_openEMS.sh ~/opt/openEMS -- Optional: Build all including hyp2mat, CTB and python_: +- **Optional:** Build all including hyp2mat, CTB and python_: .. code-block:: console ./update_openEMS.sh ~/opt/openEMS --with-hyp2mat --with-CTB --python -- Add the given paths to your Octave/Matlab environment (e.g.): +Setup the Octave/Matlab or Python Interfaces +-------------------------------------------- -.. code-block:: matlab +- **Optional:** Setup the Octave/Matlab environment, see :ref:`Octave Interface Install ` +- **Optional:** Install the Python modules, see :ref:`Python Interface Install ` - addpath('~/opt/openEMS/share/openEMS/matlab'); - addpath('~/opt/openEMS/share/CSXCAD/matlab'); - -- Optional: Add the optional packages to your Octave/Matlab environment (e.g.): - -.. code-block:: matlab - - addpath('~/opt/openEMS/share/hyp2mat/matlab'); - addpath('~/opt/openEMS/share/CTB/matlab'); Update Instruction: ------------------- @@ -90,6 +83,11 @@ Windows - Download the latest 64bit openEMS_win_ - Unzip to a folder of your choice e.g. ``C:/`` (zip contains an openEMS folder) +Setup the Octave/Matlab or Python Interfaces +-------------------------------------------- + +- **Optional:** Setup the Octave/Matlab environment, see :ref:`Octave Interface Install ` +- **Optional:** Install the Python modules, see :ref:`Python Interface Install ` macOS ===== diff --git a/doc-src/octave/install.rst b/doc-src/octave/install.rst new file mode 100644 index 0000000..628cbb9 --- /dev/null +++ b/doc-src/octave/install.rst @@ -0,0 +1,50 @@ +.. _octave_install: + +Install +======= + +Instructions how to install the **CSXCAD & openEMS Octave/Matlab interface**. + +Requirements +------------ + +Install Octave_ or Matlab_ and make sure openEMS and dependencies were installed correctly. +See :ref:`Install from Source ` for more details. + +Setup +----- + +To run the simulation scripts it is necessary to tell Octave (or Matlab) where to find the interface scripts. + +.. _Octave Linux Install: + +Linux +^^^^^ + +On **Linux** these folders are usually located under e.g. ``/usr/share/openEMS/matlab`` and ``/usr/share/CSXCAD/matlab`` or +if you installed from source (e.g. to ``/opt``) under ``/opt/share/openEMS/matlab`` and ``/opt/share/CSXCAD/matlab``. +You may add this folders manually using: + +.. code-block:: matlab + + addpath('/opt/share/openEMS/matlab'); + addpath('/opt/share/CSXCAD/matlab'); + +Alternatively you can setup these path more permanently using the "Edit"-Menu using "Set Path" in Octave. + +.. _Octave Windows Install: + +Windows +^^^^^^^ + +On **Windows** there is only one folder to add. If you unzipped the windows build e.g. to ``C:\openEMS`` than the path would be ``C:\openEMS\matlab``. +You may add this folders manually using: + +.. code-block:: matlab + + addpath('C:\openEMS\matlab'); + +Alternatively you can setup these path more permanently using the "Edit"-Menu using "Set Path" in Octave. + +.. _Octave: https://octave.org/ +.. _Matlab: https://en.wikipedia.org/wiki/MATLAB diff --git a/doc-src/octave/octave.rst b/doc-src/octave/octave.rst new file mode 100644 index 0000000..44cb2aa --- /dev/null +++ b/doc-src/octave/octave.rst @@ -0,0 +1,8 @@ +.. _octave_interface: + +Octave/Matlab Interface +======================= + +.. toctree:: + + install diff --git a/doc-src/python/install.rst b/doc-src/python/install.rst index 54d8aaf..49210f3 100644 --- a/doc-src/python/install.rst +++ b/doc-src/python/install.rst @@ -20,6 +20,8 @@ Additionally Cython is required to compile CSXCAD and openEMS e.g. on Linux. pip install cython +.. _Python Linux Install: + Linux ----- @@ -56,6 +58,8 @@ Build Modules From Source Manually **Note:** The install command may require root on Linux, or add ``--user`` to install to *~/.local* +.. _Python Windows Install: + Windows -------