-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmathjs_info.txt
35 lines (24 loc) · 928 Bytes
/
mathjs_info.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
math.size(A)
math.transpose(A)
math.inv(A)
math.identity(n)._data
math.add(A,B) addition (can also do element wise of matrix plus scalar)
math.subtract(A,B)
math.multiply(A,B,C) matrix multiplication (can also do matrix times scalar)
math.dotMultiply(A,B) element wise multiplication
math.divide(A,B)
math.cross(x,y) cross product
math.dot(x,y) dot product
math.concat()
math.resize(A,[m,n])
creates range object, so put ._data to get the array:
math.zeros(m,n)._data
math.ones(m,n)._data
math.range(a,b,c)._data a to b (not including b) with step size c
var B=math.eigs(A) eigenvalues and vectors
B.values eigenvalues
B.vectors eigenvectors
math.column(A,n) returns nth column from matrix
const d = [[1, 2], [3, 4]]
math.subset(d, math.index(1, 0)) // returns 3
math.subset(d, math.index([0, 1], 1)) // returns [[2], [4]]