O()

function out=O(in)

Input:

Global variables:

Output:

To produce a function of the above prototype, copy the program in Appendix D into the file ``O.m'' (in your octave directory) and replace the ``...'' on the line labeled ``YOUR CODE HERE'' with code to compute out according to the definition of the O() operator in the function specification given above.

Hints: Don't forget that, to access R, you will need to use the variable name gbl_R. Also, be sure to include a semicolon at the end of your line for computing out. Otherwise, you'll be plagued by a large printout of your results!

To verify your O() operator, execute the following at the octave prompt (after running your new ``setup.m'', of course),

in=randn(10,1) %# Create a random (normally distributed) 10x1 column vector
out=O(in); %# Apply O to in and store result in out
out./in %# Check ratio of each element of out to each element of in
det(R) %# Compare to det(R)



Tomas Arias 2004-04-08