poelis-sdk is installed, then use the Poelis MATLAB Toolbox.
That gives you:
- Values and metadata from Poelis inside MATLAB, including units
- Calculations that stay in MATLAB
- Poelis as the source of truth for the engineering data those calculations read
How it works
MATLAB talks to Python throughpyenv. The Poelis MATLAB Toolbox is a thin wrapper around the Python SDK. Helpers such as poelis_sdk.checkInstallation() and poelis_sdk.PoelisClient(...) live in MATLAB. The requests themselves run in the poelis-sdk package inside your virtual environment.
First-time setup
1
Install the Poelis MATLAB Toolbox
Download the latest
PoelisToolbox-<version>.mltbx release and install it in MATLAB. Double-click the .mltbx file, or run:2
Create a Python environment and install poelis-sdk
- macOS and Linux
- Windows
which python or where python. MATLAB needs that path in the next step.3
Point MATLAB at that Python environment
- macOS and Linux
- Windows
4
Verify the setup
poelis-sdk version and a file path inside the environment you configured.5
Run the sample script
Open
try_poelis_matlab.m (src/poelis_matlab/try_poelis_matlab.m). Replace the API key and demo paths with your own, then run the script.Update an existing setup
A new release usually means a new toolbox file and a newerpoelis-sdk.
1
Install the new MATLAB toolbox
Install the new If MATLAB asks you to restart after the toolbox update, restart before the next step.
PoelisToolbox-<version>.mltbx file:2
Upgrade the Python SDK
Activate the same Python environment MATLAB uses, then upgrade the package.
- macOS and Linux
- Windows
3
Restart MATLAB's Python session
pyenv('Version', ...) again with the new path.4
Verify the update
Troubleshooting
MATLAB loads the wrong Python package
MATLAB loads the wrong Python package
Check the file path MATLAB imported:The path should sit inside the virtual environment you configured in
pyenv.You switched Python environments
You switched Python environments
Run
terminate(pyenv) before pyenv('Version', ...) again. MATLAB keeps the previous interpreter until that session ends.The toolbox is new and Python is old
The toolbox is new and Python is old
MATLAB can still load the previous
poelis-sdk. Upgrade the package in the environment from pyenv, then terminate(pyenv).Python is new and the toolbox is old
Python is new and the toolbox is old
MATLAB wrapper fixes and examples ship in the toolbox. Install the matching
PoelisToolbox-<version>.mltbx as well.