2.2.2.20 msubtract


Menu Information

Analysis: Mathematics: Subtract

Brief Information

Subtract matrices in sheet by another matrix (A-B)

Command Line Usage

1. msubtract -r 2 imb:=[MBook1]MSheet1! active:=1 option:=same;

2. msubtract -r 1 imb:=[MBook1]MSheet1! option:=all;

X-Function Execution Options

Please refer to the page for additional option switches when accessing the x-function from script

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
A ims

Input

MatrixLayer

<active>

Specifies the input matrix A.

B imb

Input

MatrixLayer

<active>

Specifies the input matrix B.

A-B oms

Output

MatrixObject

<input>

Specifies the output matrix. Get the result of subtracting matrix objects in the B sheet by the specified matrix object in the A sheet.

See the syntax here.

Active Matrix in A active

Input

int

0

Specifies whether use the active matrix object in A sheet as the minuend. If not, use each object in the A sheet to subtract matrix object in B.

Option List:

  • 0=false
    Each matrix object in A sheet - matrix object in B sheet (Specified by option variable).
  • 1=true
    Active matrix object in A sheet - matrix object in B sheet (Specified by option variable).
Subtract option

Input

int

0

Specifies the matrix objects in B sheet for subtraction.

Option List:

  • 0=active:Active matrix in B
    Active matrix object in B sheet
  • 1=first:First matrix in B
    First matrix object in B sheet
  • 2=same:Same matrix in B
    Subtract the matrix object in B with the same index number as the active matrix object in A.
    Note: this option is available, when Active Matrix in A is selected (active=1).
  • 3=all:All matrices in both sheets
    Subtract each matrix object in B by the matrix object in A with the same index number.
    Note: this option is available, when Active Matrix in A is unselected (active=0).
  • 4=periodic:Periodic matrices in B
    Subtract each matrix object in B by incrementing through (a generally much larger set of) matrix objects in A, from index number = 1 to = end. This option could be used, for instance, when subtracting a monthly mean derived from a long time period of monthly readings, from the monthly readings, themselves.

Description

You can use this X-Function to Subtract matrices in sheet by another matrix.

Related X-Functions

mdim, mexpand, mproperty, mreplace, mrotate90, msetvalue, mflip, mtranspose , msmooth


Keywords:subtract