matlab-subprocess-stdin
This is part of https://github.com/geospace-code/matlab-stdlib
stdlib.sys.subprocess_run()
Uses Java ProcessBuilder (built into Matlab) to run external processes from Matlab >= R2021a with stdin pipe. Matlab system() does not allow for stdin pipes, but these examples do allow stdin pipes. Using stdin / stdout instead of temporary scratch files can be faster and more robust.
Simply copy subprocess_run.m into your Matlab project.
cmake -B build
cmake --build build
ctest --test-dir build -V
The executable must exist as a file. For example, on Windows the inbuilt shell commands that aren't files like "dir" don't work. This is also true in Python subprocess module.
On Windows, using system()
with MPIexec can cause intermittent segfaults that don't occur from Terminal.
Using our Java ProcessBuilder-based subprocess_run() can mitigate this issue.
Cite As
scivision (2024). matlab-subprocess-stdin (https://github.com/scivision/matlab-subprocess-stdin/releases/tag/v1.1.0), GitHub. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxTags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
python
test
Version | Published | Release Notes | |
---|---|---|---|
1.1.0.0 | See release notes for this release on GitHub: https://github.com/scivision/matlab-subprocess-stdin/releases/tag/v1.1.0 |
||
1.0.0 |