Matrix multiply ordinates (A*f).
g=A*f
g=f*A
Matrix multiplication between a numeric array A and an imat_fn object f 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 the left operand match the row dimension of the right operand. At each abscissa value, a matrix or vector the same dimension as f is formed, and the matrix product 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 A*f does not give an ordinate equal to A*(f.ordinate). In the first expression, A must have column dimension equal to the row dimension of f. In the second expression, A must have column dimension equal to the number of abscissa values of f.
>> 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
>> x=[1 -1 0 ; -1 0 1] % x is 2x3 (ncols = nrows of f)
x =
1 -1 0
-1 0 1
>> g=x*f; g.ordinate % g is 2x1 with 5 abscissa values
ans =
-5 10
-5 10
-5 10
-5 10
-5 10
>> g % Note all outputs have attributes of f(1)
g =
2x1 IMAT Function with the following attributes:
Record Name FunctionType AbscissaSpacing NumberElements
-------------------- ---------------- ---------------- ----------------
1_(1X+,1X+) Time Response Even 5
2_(1X+,1X+) Time Response Even 5
>>