{"id":18581418,"url":"https://github.com/zeybek/node-matlab","last_synced_at":"2026-03-13T23:03:01.848Z","repository":{"id":45626770,"uuid":"360945930","full_name":"zeybek/node-matlab","owner":"zeybek","description":"NodeJS Package for MATLAB","archived":false,"fork":false,"pushed_at":"2021-10-07T02:35:42.000Z","size":21,"stargazers_count":5,"open_issues_count":1,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-05-01T13:27:20.118Z","etag":null,"topics":["algebra","analytics","data","matlab","matrix","signal-processing"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zeybek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-23T16:33:50.000Z","updated_at":"2024-04-07T04:36:07.000Z","dependencies_parsed_at":"2022-09-11T22:50:43.024Z","dependency_job_id":null,"html_url":"https://github.com/zeybek/node-matlab","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeybek%2Fnode-matlab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeybek%2Fnode-matlab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeybek%2Fnode-matlab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeybek%2Fnode-matlab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zeybek","download_url":"https://codeload.github.com/zeybek/node-matlab/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248208689,"owners_count":21065205,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algebra","analytics","data","matlab","matrix","signal-processing"],"created_at":"2024-11-07T00:05:13.560Z","updated_at":"2026-03-13T23:03:01.742Z","avatar_url":"https://github.com/zeybek.png","language":"JavaScript","funding_links":[],"categories":["Interfacing with other languages"],"sub_categories":[],"readme":"# node-matlab\n\n![NPM](https://img.shields.io/npm/l/node-matlab?style=flat-square)\n![npm](https://img.shields.io/npm/v/node-matlab?style=flat-square)\n![GitHub issues](https://img.shields.io/github/issues/zeybek/node-matlab?style=flat-square)\n![npm](https://img.shields.io/npm/dw/node-matlab?style=flat-square)\n![MATLAB](https://img.shields.io/badge/MATLAB-%3E%3D%202019a-blue?style=flat-square)\n\nRuns MATLAB script and gives output\n\n## Install\n\n```\n$ npm install node-matlab\n```\n\n## Requirements\n\nMATLAB 2019a or later must be installed on your pc, you don't need to install Python/Jupyter Notebook or MATLAB kernel\n\n## Usage\n\n```js\n// One Line\nconst matlab = require(\"node-matlab\");\n\nmatlab\n  .run(\"3+4\")\n  .then((result) =\u003e console.log(result))\n  .catch((error) =\u003e console.log(error));\n\n// 7\n```\n\nYou need to escape \"\\n\", \"\\r\" etc. to run multiline scripts\n\n```js\n// Multi Line\nconst matlab = require(\"node-matlab\");\n\nmatlab\n  .run(\n    `clc;\nclear;\ncounter = 0;\n\nperiod = 0.1;\ntotalTime = 2;\n\nfor number = 0:period:totalTime\n  counter = counter + 1;\n  array(counter) = -2 * cos(2 * pi * 2 * number + deg2rad(47));\n  fprintf(\"t(%g) = %g\\\\n\", number, array(counter));\nend\n  `\n  )\n  .then((result) =\u003e console.log(result))\n  .catch((error) =\u003e console.log(error));\n\n/**********************\nt(0) = -1.364\nt(0.1) = 0.969619\nt(0.2) = 1.96325\nt(0.3) = 0.243739\nt(0.4) = -1.81262\nt(0.5) = -1.364\nt(0.6) = 0.969619\nt(0.7) = 1.96325\nt(0.8) = 0.243739\nt(0.9) = -1.81262\nt(1) = -1.364\nt(1.1) = 0.969619\nt(1.2) = 1.96325\nt(1.3) = 0.243739\nt(1.4) = -1.81262\nt(1.5) = -1.364\nt(1.6) = 0.969619\nt(1.7) = 1.96325\nt(1.8) = 0.243739\nt(1.9) = -1.81262\nt(2) = -1.364\n*********************/\n```\n\n```js\n// Read From File\nconst matlab = require(\"node-matlab\");\n\nmatlab\n  .run(\"file.m\")\n  .then((result) =\u003e console.log(result))\n  .catch((error) =\u003e console.log(error));\n\n// t + 4*exp(-t) - 3*exp(-2*t) + 1\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeybek%2Fnode-matlab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzeybek%2Fnode-matlab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeybek%2Fnode-matlab/lists"}