simple-squiggle

A restricted subset of Squiggle
Log | Files | Refs | README

identity.js (473B)


      1 export var identityDocs = {
      2   name: 'identity',
      3   category: 'Matrix',
      4   syntax: ['identity(n)', 'identity(m, n)', 'identity([m, n])'],
      5   description: 'Returns the identity matrix with size m-by-n. The matrix has ones on the diagonal and zeros elsewhere.',
      6   examples: ['identity(3)', 'identity(3, 5)', 'a = [1, 2, 3; 4, 5, 6]', 'identity(size(a))'],
      7   seealso: ['concat', 'det', 'diag', 'inv', 'ones', 'range', 'size', 'squeeze', 'subset', 'trace', 'transpose', 'zeros']
      8 };