Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Group: Matrix Manipulation
Topic: General Commands
See also: eye matrix diag zeros

Function: unit
Description: creates a d-dimensional identity matrix

Usage: z = unit(d)
Input:
d positive integer, dimension of matrix
Output:
z d x d identity matrix

Example:
z = unit(3)
z

Result:
Contents of z

[1,]        1        0        0
[2,]        0        1        0
[3,]        0        0        1



(C) MD*TECH Method and Data Technologies, 05.02.2006