Analysis: Mathematics: Simple Math
Perform element-wise arithmetic on two matrices
1. mmathtool -r 2 imb:=[MBook2]MSheet1! formula:="A*2+B-3";
2. mmathtool -r 1 ims:=MSheet2 imb:=MSheet1 formula:="A*B" active:=1;
Please refer to the page for additional option switches when accessing the x-function from script
Display Name |
Variable Name |
I/O and Type |
Default Value |
Description |
---|---|---|---|---|
A | ims |
Input MatrixLayer |
|
Specifies the input matrix A. |
B | imb |
Input MatrixLayer |
|
Specifies the input matrix B. |
A-B | oms |
Output MatrixObject |
|
Specifies the output matrix. Get the result of element-wise arithmetic on two matrices. See the syntax here. |
Formula | formula |
Input string |
|
Input the formula for two matrices arithmetic Note: Add, subtract, multiply, divide and power (+-*/^) are supported in the formula. |
Active Matrix in A | active |
Input int |
|
Specifies whether use the active matrix object in A sheet to arithmetic. If not, use each object in the A sheet will use to arithmetic. Option List:
|
B Selection | option |
Input int |
|
Specifies the matrix objects in B sheet for arithmetic. Option List:
|
You can use this X-Function to perform element-wise arithmetic on two matrices. You can input the simple math formula.
mdim, mexpand, mproperty, mreplace, mrotate90, msetvalue, mflip, mtranspose, msubtract , msmooth
Keywords:math