Difference between revisions of "Documentation/How Tos/Calc: MUNIT function"

From Apache OpenOffice Wiki
Jump to: navigation, search
(Initial content)
 
(Syntax:: added image)
Line 6: Line 6:
 
=== Syntax: ===
 
=== Syntax: ===
 
<tt>'''MUNIT(size)'''</tt>
 
<tt>'''MUNIT(size)'''</tt>
 +
[[Image:Calc_munit.png|right]]
 
: returns the unit matrix, also known as the identity matrix '''I''', of size <tt>'''size'''</tt> (an integer greater than zero).
 
: returns the unit matrix, also known as the identity matrix '''I''', of size <tt>'''size'''</tt> (an integer greater than zero).
  
Line 11: Line 12:
  
 
: <tt>'''MUNIT'''</tt> returns an array, and must be entered as an array formula (for example by using '''Cntrl-Shift-Enter''' rather than just '''Enter''').
 
: <tt>'''MUNIT'''</tt> returns an array, and must be entered as an array formula (for example by using '''Cntrl-Shift-Enter''' rather than just '''Enter''').
 +
<br style="clear:both;" />
  
 
=== Example: ===
 
=== Example: ===

Revision as of 08:19, 14 March 2008


MUNIT

Returns a unit (identity) matrix of a given size.

Syntax:

MUNIT(size)

Calc munit.png
returns the unit matrix, also known as the identity matrix I, of size size (an integer greater than zero).
The identity matrix has ones on the leading diagonal, and zeroes elsewhere.
MUNIT returns an array, and must be entered as an array formula (for example by using Cntrl-Shift-Enter rather than just Enter).


Example:

=MUNIT(2)

when entered as an array formula in cell B3, returns {1;0|0;1}, so that B3, C3, B4, C4 show 1, 0, 0, 1 respectively.

See also:

MDETERM, MINVERSE, MMULT

How To Use Arrays

Array functions

Personal tools