Questions tagged [mathjs]

Math.js is an extensive math library for JavaScript and Node.js. It features a flexible expression parser and offers an integrated solution to work with numbers, big numbers, complex numbers, units, and matrices.

Math JS Site

An extensive math library for JavaScript and Node.js

Math.js is an extensive math library for JavaScript and Node.js. It features a flexible expression parser and offers an integrated solution to work with numbers, big numbers, complex numbers, units, and matrices. Powerful and easy to use.

Features

-Supports numbers, big numbers, complex numbers, units, strings, arrays, and matrices.

-Is compatible with JavaScript’s built-in Math library.

-Contains a flexible expression parser.

-Supports chained operations.

-Comes with a large set of built-in functions and constants.

-Has no dependencies. Runs on any JavaScript engine.

-Is easily extensible

98 questions
0
votes
1 answer

How can I apply a custom scalar function elementwise to a matrix in math.js?

Consider the matrix m: let m = [ [ 1 , 2 ] , [ 3 , 4 ] ] Apply the exponentiation function to m: let mexp = math.exp(m) Now JSON.stringify(mexp) outputs: "[[2.718281828459045,7.38905609893065],[20.085536923187668,54.598150033144236]]" So the…
sbtpr
  • 541
  • 5
  • 18
0
votes
1 answer

trouble translating 11-line toy neural network code to JavaScript

I am giving a short presentation on neural networks Tuesday to my fellow student web developers. I was hoping to translate this code (under Part 1, a tiny toy neural network: 2 layer network) to JavaScript so it would be more recognizable to my…
Katie
  • 808
  • 1
  • 11
  • 28
0
votes
1 answer

Create a dynamic array on a node server from the firebase database that updates with child_removed

My goal is is to create an array on a nodeJS server that is constantly updating based on data that is changing in the backend on the firebase realtime database. Once the data is in an array, I need to perform a calculation with MathJS, then push…
0
votes
2 answers

Function documentation and syntax - ECMA262

Help me where I can find documentation for the TO_NUMBER function and what does the %(percentage sign) mean when placed before MathExpRT (which also can't find any docs about…
Mark Spencer
  • 81
  • 1
  • 6
0
votes
4 answers

How to add this multidimensional matrix?

i am totally new guy to javascript.I dont know how to add these two varible that are in multidimensional array in matrix way.Would you pls suggest any npm module with an example or the manual algorithm would be appreciated. these are my two…
Nane
  • 2,370
  • 6
  • 34
  • 74
0
votes
1 answer

Parsing latex with jlatexmath

I am using https://github.com/opencollab/jlatexmath to parse latex math formulas in java. When trying to parse a simple complex number: TeXFormula tex = new TeXFormula("32 + 45~i"); I get the following…
0
votes
1 answer

Calculating Upper Fence using Math.js

I have a list of numbers in an array and I would like to calculate the Upper Fence. I know I'll have to calculate the median, that can be done using the math.js library. var median = math.median(numList); And then the third quartile is the upper…
0
votes
2 answers

math.js error : unknown type "tring"

I am getting the Error: unknown type "tring" ( throw new Error('Unknown type "' + name + '"' + ', math.js (line 751, col 16)) with math.js . The same error arose frommath.min.js . i have downloaded math.js package from repository …
olga
  • 959
  • 1
  • 15
  • 42
0
votes
1 answer

Where is pi defined in mathjs?

I have a custom bundle for mathjs that looks something like so: var core = require('mathjs/core'); var math =…
Mark McClure
  • 4,862
  • 21
  • 34
0
votes
1 answer

Custom control statements with math.js and code evaluation

I am creating online calculator which allows user to perform mathmatical operations. In core, I am using math.js evaluator to get the results of the operations. Currently, user can type operations one by one in command line, but next step of my…
Kamil
  • 782
  • 1
  • 6
  • 22
0
votes
1 answer

Is it possible to find inverse function with mathjs ?

Because I couldn't find any answer on documentation... His there a way to find math inverse function with mathjs or Nodejs ?
Ju Chépa
  • 67
  • 10
0
votes
0 answers

mathjs DimensionError thown on load

Trying to use the mathjs module for some matrix maths in NodeJS. The require statement seems to throw an exception var math = require("mathjs"); Exception is: DimensionError at Object.
0
votes
1 answer

Polymer 1.0 Adding variables in a polymer function

I am not sure if this is a bug or i am doing something wrong. I have 6 properties (function () { Polymer({ is: 'claim-type', properties: { foo: { type: Number, value: false, observer: 'add' …
PSVapour
  • 33
  • 6
0
votes
1 answer

Searching for (any) strings in another string separated by non-alphanumeric characters

How can I extract words (which can be anything) out of a string which are separated by non-alphabetic characters (digits or symbols) and save the result in an array. For example if I parsed the following I would like to have the name of the three…
Crocodile
  • 5,724
  • 11
  • 41
  • 67
0
votes
0 answers

es5 parameters shadowing troubles in safari

In my Grunt/yeoman/angular project, I have part of the code written as node modules and imported by Grunt during the build project with browserify. it happens that, only on safari(checked on 7 and 8), the minified version of the webapp doesn't work…
steeeveb
  • 35
  • 5