imat_fn/mrdivide


Purpose

Matrix divide ordinates (f/A).

Syntax

g=f/A

Description

Matrix division between an imat_fn object f and a numeric array A is performed repeatedly at all abscissa/ordinate values. This type of operation requires that all elements of f have the same abscissa values, and that the column dimension of f match the column dimension of A. At each abscissa value, a matrix or vector the same dimension as f is formed, and the matrix division is computed. The resulting matrix or vector is placed into the ordinate of the result, with the same abscissa values as f. The data attributes of the result are taken from f(1). In particular, the units exponents will be set assuming that A is a unitless quantity.

Note that f/A does not give an ordinate equal to (f.ordinate)/A. In the first expression, A must have a column dimension equal to the column dimension of f. In the second expression, A must have a column dimension equal to the number of abscissa values of f.

Examples

>> f=imat_fn(3,'ordinate',reshape(1:15,5,3));
>> f.responsenode=(1:3)'

f =
3x1 IMAT Function with the following attributes:
Record Name          FunctionType     AbscissaSpacing  NumberElements
-------------------- ---------------- ---------------- ----------------
1_(1X+,1X+)          Time Response    Even             5
2_(1X+,2X+)          Time Response    Even             5
3_(1X+,3X+)          Time Response    Even             5

>> f.ordinate                % f is 3x1 with 5 abscissa values

ans =
     1     6    11
     2     7    12
     3     8    13
     4     9    14
     5    10    15

>> A=(1:3)'                  % A is 3x1 (ncols = ncols of f)

A =
     1
     2
     3

>> g=f/A; g.ordinate         % g is 3x3 with 5 ordinate values

ans(:,:,1) =
     0     0     0
     0     0     0
     0     0     0
     0     0     0
     0     0     0

ans(:,:,2) =
     0     0     0
     0     0     0
     0     0     0
     0     0     0
     0     0     0

ans(:,:,3) =
    0.3333    2.0000    3.6667
    0.6667    2.3333    4.0000
    1.0000    2.6667    4.3333
    1.3333    3.0000    4.6667
    1.6667    3.3333    5.0000

>> g                         % Note all outputs have attributes of f(1)

g =
3x3 IMAT Function with the following attributes:
Row Col Record Name         FunctionType     AbscissaSpacing  NumberElements
--- --- ------------------- ---------------- ---------------- ----------------
1   1   1_(1X+,1X+)         Time Response    Even             5
2   1   2_(1X+,1X+)         Time Response    Even             5
3   1   3_(1X+,1X+)         Time Response    Even             5
1   2   4_(1X+,1X+)         Time Response    Even             5
2   2   5_(1X+,1X+)         Time Response    Even             5
3   2   6_(1X+,1X+)         Time Response    Even             5
1   3   7_(1X+,1X+)         Time Response    Even             5
2   3   8_(1X+,1X+)         Time Response    Even             5
3   3   9_(1X+,1X+)         Time Response    Even             5

>>

See Also

imat_fn/mldivide, imat_fn/mtimes