MATLAB has no unit-matrix function: use eye(n) for the identity matrix, speye(n) for sparse. Syntax, data types, empty-result rules and Octave. This page is for researchers and analysts who need a ...