An easy-to-use, MATLAB-style matrix manipulation library for JavaScript.
jsMatrix is a JavaScript library that aims to bring the power of MATLAB to the web. jsMatrix currently features:
All functions are based on their MATLAB counterparts and work identically for the most part. However, the use of JavaScript leads to certain key differences from MATLAB syntax, as explained in the documentation.
The jsMatrix Console is a basic interactive front-end to the jsMatrix library.
jsMatrix is available in two forms: compressed and uncompressed JavaScript code. Most users will need only the compressed file, since it is smaller in size and hence loads faster. The uncompressed file can be useful if you want to have a look at and/or modify the code.
Right-click and save one of the following files:
Download (compressed)
Version 0.1 (19 KB)
Download (uncompressed)
Version 0.1 (27 KB)
<script type="text/javascript" src="jsmatrix-0.1-mini.js"></script>
<div id="results">
<!-- Placeholder for output -->
<div>
<script type="text/javascript">
/* Product of two matrices */
a = [[1, 2, 3],
[2, 3, 4],
[4, 5, 6]];
b = [[1, 2, 3],
[4, 5, 6],
[7, 8, 9]];
c = mtimes(a, b);
document.getElementById('results').display(c);
/* Sine of angles from 0 to 90 degrees in increments of 10 degrees */
d = sind(range(0, 10, 90));
document.getElementById('results').display(d);
</script>
| Version | Release Date | Download Size | |
|---|---|---|---|
| 0.1 (compressed) | 24 November 2009 | 19 KB | Download |
| 0.1 | 24 November 2009 | 27 KB | Download |
The documentation for jsMatrix is available here.
jsMatrix is distributed under the terms of the BSD license, which can be found here.