matlab-bridge

0.0.0-development • Public • Published

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();

Package Sidebar

Install

npm i matlab-bridge

Weekly Downloads

1

Version

0.0.0-development

License

MIT

Unpacked Size

11.2 kB

Total Files

9

Last publish

Collaborators

  • gregzanchelli