Programmer Guide/Command Reference/EVAL/mul: Difference between revisions

From STX Wiki
Jump to navigationJump to search
No edit summary
No edit summary
Line 4: Line 4:
;Result: If both arguments ''x'' and ''y'' are vectors, the tensor (or dyadic) product of the vectors is computed and the result ''r'' is a matrix with <code>nrow(''x'')</code> rows and <code>nrow(''y'')</code> columns.  
;Result: If both arguments ''x'' and ''y'' are vectors, the tensor (or dyadic) product of the vectors is computed and the result ''r'' is a matrix with <code>nrow(''x'')</code> rows and <code>nrow(''y'')</code> columns.  
::<code>''r''<sub>i,j</sub> = ''x''<sub>i</sub> * ''y''<sub>j</sub></code>
::<code>''r''<sub>i,j</sub> = ''x''<sub>i</sub> * ''y''<sub>j</sub></code>
:For all other combinations of data types, the [[Programmer_Guide/Command_Reference/EVAL#Operators|operator *]] is applied to ''x'' and ''y'' and the product <code>''x''*''y''</code> is returned. If the multiplication is not possible (e.g. invalid combination of data types), the function <code>mul</code> failes.
:For all other combinations of data types, the [[Programmer_Guide/Command_Reference/EVAL#Operators|operator *]] is applied to ''x'' and ''y'' and the product <code>''x''*''y''</code> is returned. If the multiplication is not possible (invalid combination of data types), the function <code>mul</code> failes.


;See also: [[Programmer_Guide/Command_Reference/EVAL/trn|trn]], [[Programmer_Guide/Command_Reference/EVAL/inv|inv]], [[Programmer_Guide/Command_Reference/EVAL/complex arithmetic#special functions|ctrn, cmulv]]  
;See also: [[Programmer_Guide/Command_Reference/EVAL/trn|trn]], [[Programmer_Guide/Command_Reference/EVAL/inv|inv]], [[Programmer_Guide/Command_Reference/EVAL/complex arithmetic#special functions|ctrn, cmulv]]  


[[Programmer_Guide/Command_Reference/EVAL#Functions|<function list>]]
[[Programmer_Guide/Command_Reference/EVAL#Functions|<function list>]]

Revision as of 16:06, 8 April 2011

Compute the inverse of x.

Usage
mul(x, y)
Result
If both arguments x and y are vectors, the tensor (or dyadic) product of the vectors is computed and the result r is a matrix with nrow(x) rows and nrow(y) columns.
ri,j = xi * yj
For all other combinations of data types, the operator * is applied to x and y and the product x*y is returned. If the multiplication is not possible (invalid combination of data types), the function mul failes.
See also
trn, inv, ctrn, cmulv

<function list>

Navigation menu

Personal tools