Section 5.4

Working with Matrices and Loops

Summary

  • How to reference a matrix
  • How to store values in a matrix
  • How to sort a matrix
  • How to search a matrix

How to reference a matrix

Reference vectors and matrices the same way
Typically use iterators to reference (e.g. vec(i) OR A(i,j))

How to store values in a matrix

How to sort a matrix

How to search a matrix

Search entire matrix
Binary search

Resources