If you like notebooks for exploration but also want clean, publishable technical writing, this stack works very well:
- MATLAB for analysis and engineering workflows
- Jupyter for interactive execution
- Quarto for reproducible articles and blog posts
- VS Code as the single editor for all of it
This post shows a practical setup that has worked well for me on Linux with a project-local Python environment managed by uv.
Why this combination works
Jupyter gives you fast iteration. MATLAB gives you mature numerical tooling. Quarto gives you clean publishing and version control friendly source files. In practice, you can prototype in notebook style and publish with almost no copy-paste.
Project-local Python environment with uv
I prefer a local .venv in the site repository so kernels and tools are pinned per project.
cd ~/Desktop/jasonhnicholson.com
uv venv --python 3.12 .venv
source .venv/bin/activate
uv syncImportant note: MATLAB Engine for Python currently supports Python 3.9 through 3.12. If your environment is newer (for example 3.14), MATLAB notebook execution may fail even if the kernel appears in Jupyter.
Install Jupyter + MATLAB integration packages
Inside the same virtual environment:
uv pip install --python .venv/bin/python matlab_kernel matlabengineOn Linux, matlabengine may need MATLAB runtime libraries in LD_LIBRARY_PATH at install time. Example:
MATLABROOT=/home/jason/Programs/MATLAB/2025b \
LD_LIBRARY_PATH="/home/jason/Programs/MATLAB/2025b/bin/glnxa64:${LD_LIBRARY_PATH:-}" \
uv pip install --python .venv/bin/python matlabengineThen register the MATLAB Jupyter kernel:
.venv/bin/python -m matlab_kernel install --user --replaceMake VS Code pick the right interpreter and kernels
Set your workspace interpreter to the project venv. In .vscode/settings.json:
{
"python.defaultInterpreterPath": "${workspaceFolder}/.venv/bin/python"
}Now open a notebook in VS Code and select the Matlab kernel from the kernel picker.
Quick smoke test in a notebook
Create a notebook cell and run:
disp(1+1)If everything is wired correctly, output should be:
2
Where Quarto fits in
Quarto can render executable documents and notebooks, so your analysis and write-up stay together.
Two common paths:
- Write a
.qmdarticle with executable code blocks. - Start from a notebook and publish through Quarto.
A minimal .qmd section with MATLAB code block:
## MATLAB check
::: {#73f18ada .cell execution_count=1}
``` {.matlab .cell-code}
a = 2;
b = 3;
disp(a*b)
```
::: {.cell-output .cell-output-stdout}
```
6
```
:::
:::
Then render with:
quarto renderTypical workflow
- Explore quickly in notebook cells.
- Move stable analysis to a
.qmdarticle. - Keep commands and environment setup in the repository for reproducibility.
- Publish with Quarto using the same source you used for computation.
Troubleshooting tips
- Kernel is visible but MATLAB code fails:
matlabengineis usually missing from the active venv, or Python version is unsupported.
matlabenginebuild fails on Linux:- set
MATLABROOTand include${MATLABROOT}/bin/glnxa64inLD_LIBRARY_PATHduring install.
- set
- VS Code uses wrong Python:
- set
python.defaultInterpreterPathto project.venvand reload VS Code window.
- set
- Kernel starts from wrong Python:
- reinstall kernelspec from the intended venv and replace existing spec.
Closing thoughts
Jupyter + MATLAB + Quarto is a strong setup for technical blogging and engineering documentation. You get interactive computation, reproducible environments, and polished publishing in one workflow, all from VS Code.