Difference between revisions of "Documentation/How Tos/Calc: MUNIT function"
From Apache OpenOffice Wiki
< Documentation | How Tos
m (→Syntax:) |
m |
||
Line 1: | Line 1: | ||
+ | {{DISPLAYTITLE:MUNIT function}} | ||
{{Documentation/CalcFunc ArraysTOC | {{Documentation/CalcFunc ArraysTOC | ||
|ShowPrevNext=block | |ShowPrevNext=block | ||
Line 15: | Line 16: | ||
: The identity matrix has ones on the leading diagonal, and zeroes elsewhere. | : The identity matrix has ones on the leading diagonal, and zeroes elsewhere. | ||
− | : <tt>'''MUNIT'''</tt> returns an array, and must be entered as an array formula (for example by using | + | : <tt>'''MUNIT'''</tt> returns an array, and must be entered as an array formula (for example by using {{key|Cntrl|Shift|Enter}} rather than just {{key|Enter}}). |
<br style="clear:both;" /> | <br style="clear:both;" /> | ||
Latest revision as of 10:59, 30 January 2024
MUNIT
Returns a unit (identity) matrix of a given size.
Syntax:
- 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