0.0.0-development • Published 1 year ago
matlab-bridge v0.0.0-development
Matlab Bridge 🌁
Runs Matlab code in typescript/javascript
Overview
This package acts as a middle man between node.js and Matlab. You can interact with Matlab through a Session
, which is simply a wrapper around Matlab's REPL
Getting started
Add matlab-bridge
to your node.js project.
yarn add matlab-bridge
Creating a Session
const session = new MatlabSession();
await session.initialize();
Evaluating a block of code
const output = await session.evaluateScript(`
a = linspace(1, 5, 5)';
b = a.*2;
result.a = a;
result.b = b;
jsonencode(result)
`);
Get the whole workspace
const workspace = await session.getWorkspace();
0.0.0-development
1 year ago