% talked about the material in the notes on quadrature, after some general
% (and important) remarks about the need for numerical quadrature.

% finished by illustrating just how to use reshape and the like to vectorize
% the book's compQNC. This involved, as an example, to take a sequence of 21
% function values (here denoted by 0:20), and get from it the 10-by-3 matrix
% that starts
%   0  1  2
%   2  3  4
%   4  5  6
%    ....

>> n= 10; 
>> f = 0:(2*n)

f =
  Columns 1 through 12 
     0     1     2     3     4     5     6     7     8     9    10    11
  Columns 13 through 21 
    12    13    14    15    16    17    18    19    20
>> reshape(f(2:end),2,n)
ans =
     1     3     5     7     9    11    13    15    17    19
     2     4     6     8    10    12    14    16    18    20
>> ans'
ans =
     1     2
     3     4
     5     6
     7     8
     9    10
    11    12
    13    14
    15    16
    17    18
    19    20

>> F = [[0;ans(1:n-1,2)] ans]
F =
     0     1     2
     2     3     4
     4     5     6
     6     7     8
     8     9    10
    10    11    12
    12    13    14
    14    15    16
    16    17    18
    18    19    20

%  .. and there it is. Now look at the version of CompQNC in the notes for how
% this is used there, and compare with the book's version.

diary off
