See: MHKiT-MATLAB User Installation Guide
-
Fork the repository on GitHub: https://github.com/MHKiT-Software/MHKiT-MATLAB
-
Clone your fork to your local machine:
git clone https://github.com/YOUR-USERNAME/MHKiT-MATLAB.git cd MHKiT-MATLAB -
Add upstream as a remote:
git remote add upstream https://github.com/MHKiT-Software/MHKiT-MATLAB.git
-
Uninstall the MHKiT toolbox if already installed:
- Navigate to Home > Add-Ons > Manage Add-Ons
- Right-click on "mhkit" > "Uninstall"
-
Create a conda environment for development:
conda create -n mhkit-matlab-dev python=311.conda activate mhkit-matlab-dev- Install MHKiT-Python:
Note: Developers should be careful to install the correct version of MHKiT-Python. The context of correct version depends on the specific task you are working on. For development against the release version of MHKiT-MATLAB, install the latest stable release of MHKiT-Python from conda-forge:
conda install -c conda-forge mhkitTo install the latest development version of MHKiT-Python from source, clone the MHKiT-Python repository:
git clone https://github.com/MHKiT-Software/MHKiT-Python.gitOptional, checkout the develop branch:
git checkout developInstall MHKiT-Python in from source:
pip install -e .Verify MHKiT-Python installation:
python -c "import mhkit; print(mhkit.__version__)"- Install mhkit-python-utils from source
Note: mhkit-python-utils is a required dependency for MHKiT-MATLAB. This python code handles any MATLAB-Python interoperability functionality specific for MHKiT-MATLAB.
pip install -e .- Determine the path to the Python executable in your conda environment:
python -c "import sys; print(sys.executable)"- Add the mhkit conda environment to MATLAB:
In the MATLAB command window, run:
pyenv(Version="<python executable location from above>")Restart MATLAB
- Add to MHKiT-MATLAB mhkit and examples folder to the MATLAB path:
addpath(genpath('path/to/MHKiT-MATLAB/mhkit'))If you encounter issues with Python integration, please submit an issue.