MHKiT-MATLAB is a MATLAB package designed for marine renewable energy applications to assist in data processing and visualization. The software package include functionality for:
See the documentation for more information about MHKiT.
NOTE: MHKiT-MATLAB now requires the user to install a specific version of MHKiT-Python,
currently version 0.7.0
. You can achieve this by executing the following commands in the Anaconda
environment where MHKiT-Python is installed:
pip uninstall mhkit
0.7.0
:pip install mhkit==0.7.0
python -c "import mhkit; print(mhkit.__version__)"
MHKiT-MATLAB utilizes Python functions from MHKiT-Python and requires the user to have compatible versions of Python and MHKiT-Python installed.
MHKiT-MATLAB supports the following combinations of MATLAB and Python versions.[^1]
R2021b | R2022a | R2022b | R2023a | R2023b | R2024a | |
---|---|---|---|---|---|---|
3.12 | - | - | - | - | - | - |
3.11 | - | - | - | - | ✓ | ✓ |
3.10 | - | - | ✓ | ✓ | ✓ | ✓ |
3.9 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
3.8 | ✓ | ✓ | ✓ | ✓ | - | - |
-
: MATLAB/Python versions not compatibleBefore installing MHKiT-MATLAB, please ensure your system has compatible versions of Python and MATLAB installed per the table above.
For complete installation instructions, please visit the installation guide.
To ensure software reliability and stability. MHKiT-MATLAB software runs a suite of unit tests using the above MATLAB/Python compatibility matrix on Linux (ubuntu-latest
), MacOS (macos-latest
) and Windows (windows-latest
). These tests simulate a user's machine, but they are not perfect. Unit test failures on GitHub Actions may not necessarily indicate actual issues but could be artifacts of the build environment. Users should consider using a tested version if issues arise.
The test matrices below detail the current state of unit testing. An "X" indicates a OS/MATLAB/Python version with a failing MHKiT-MATLAB unit test on GitHub Action that is due to Actions environment.
ubuntu-latest
)R2021b | R2022a | R2022b | R2023a | R2023b | R2024a | |
---|---|---|---|---|---|---|
3.12 | - | - | - | - | - | - |
3.11 | - | - | - | - | ✓ | ✓ |
3.10 | - | - | ✓ | ✓ | ✓ | ✓ |
3.9 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
3.8 | ✓ | ✓ | ✓ | ✓ | - | - |
macos-latest
)R2021b | R2022a | R2022b | R2023a | R2023b | R2024a | |
---|---|---|---|---|---|---|
3.12 | - | - | - | - | - | - |
3.11 | - | - | - | - | ✓ | ✓ |
3.10 | - | - | ✓ | ✓ | ✓ | ✓ |
3.9 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
3.8 | ✓ | ✓ | ✓ | ✓ | - | - |
windows-latest
)R2021b | R2022a | R2022b | R2023a | R2023b | R2024a | |
---|---|---|---|---|---|---|
3.12 | - | - | - | - | - | - |
3.11 | - | - | - | - | ✓ | ✓ |
3.10 | - | - | ✓ | ✓ | ✓ | ✓ |
3.9 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
3.8 | ✓ | ✓ | ✓ | ✓ | - | - |
-
: MATLAB/Python version not compatible.We encourage contributions through pull requests. Please submit your contributions via pull requests on this repository.
Uninstall the MHKiT toolbox if already installed:
Clone or download the MHKiT-MATLAB source code. If contributing code, fork the repository and submit a pull request. GitHub provides details on the forking and pull request process here.
Install the latest Python versions of mhkit
and mhkit_python_utils
.
MHKiT-MATLAB
directory:
mhkit-python
:pip install mhkit
mhkit-python-utils
:pip install -e .
Add the MHKiT-MATLAB/mhkit
folder and its subfolders to your MATLAB path.
Ensure code integrity by running unit tests locally before pushing changes to GitHub.
To execute all unit tests, run mhkit/tests/runTests.m
. Unit test results will display in the command window.
Code coverage reports are automatically generated during unit testing (refer to Local Unit Testing for execution instructions). mhkit/tests/coverage_report
contains results from the most recent code coverage report.
MHKiT is copyright through the National Renewable Energy Laboratory, Pacific Northwest National Laboratory, and Sandia National Laboratories. The software is distributed under the Revised BSD License.
See copyright and license for more information.
[^1]: For a comprehensive list of compatible MATLAB/Python versions, refer to the MathWorks Python Compatibility Documentation.