Introductory Programming Fall 2005 For today, you should have: 1) prepared for a quiz on matrices No class on Thursday (Career Initiatives Day). No class next Tuesday (Olin Monday) See you next Thursday 13 October! Accumulating a matrix --------------------- Section 4.15 shows a way to compute a Fibonacci sequence and store the terms in a matrix: a = [1 1]; for i = 3:n term = a(end) + a(end-1); a = [a term]; end This way of building a matrix is convenient if you don't know ahead of time how big the matrix will be. zeros ----- Yet another way to create a matrix is the function zeroes, which creates a matrix and sets all the elements to 0. It takes two arguments: the number of rows and columns. >> row_vector = zeros(1, 10) >> column_vector = zeros(10, 1) >> whos row_vector 1x10 80 double array column_vector 10x1 80 double array If you know how big a matrix will be, it is often most efficient to create it all at once. In the space below, write a script that computes a Fibonacci sequence by creating the matrix all at once and then filling it in.