BayES BayES

B.6 Special matrices

The following statements are used to construct some special matrices, like the identity or a matrix of zeros.



Syntax

Arguments and performed function



W = eye(M, N);

W is the M×N upper left block of an identity matrix of size M×M if M >N or N×N otherwise.

  • M must be a positive integer
  • N must be a positive integer



W = zeros(M, N);

W is an M×N matrix of zeros.

  • M must be a positive integer
  • N must be a positive integer



W = ones(M, N);

W is an M×N matrix of ones.

  • M must be a positive integer
  • N must be a positive integer



W = range(f, t [, b]);

W is a column vector containing values from f to t, spaced by b. The default value of b is one.

  • f must be a scalar
  • t must be a scalar
  • b must be a scalar


Share this content:
Facebook Twitter LinkedIn Email
© 2016–20 Grigorios Emvalomatis