Matrices

A general matrix consists of n rows and m columns.

The recording below shows how to

  • create a matrix
  • do arithmetic operations with a scalar on a matrix
  • find the size by using size(matrix)
  • get an element specified by matrix(row,column)
  • do comparisons on matrices
  • use QtOctave's graphical user interface to handle matrices

Exercise

Try the commands ones(3), zeros(4), eye(5)!

by Malin Christersson under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 Sweden License