Wednesday, June 3, 2009

Cool Final Projects!

Now that we have the go ahead for next year’s Calculus Research Lab, I decided to have my AP Calculus students try out a little Scientific Computing this year as a final project.  I introduced Octave, a Linux FOSS version of MATLAB released under the GNU Public License. 
Our final project is going very well even as we speak!  What’s really cool about Octave is that the primary data structure is a matrix.  You can work with a matrix of integers or reals of any dimension.  You can have a rectangular matrix: 2x3, 4x2, etc.  You can work with square matrices: 2x2, 3x3, etc.  You can even represent a row vector as a matrix: 1x4, 1x5, etc.  You can easily represent column vectors too: 3x1, 5x1.  And of course, you can represent a single number: 1x1.  We can add, subtract, multiply and transpose any of these matrices.  We can find the determinant of a matrix and its inverse.

First we talked about vector arithmetic (vector sums and differences, dilations, scalar dot products, vector cross products, triple scalar products, angles, areas and volumes in R^2 and R^3).  Then we kicked it up a notch with Matrix Algebra (systems of equations, linear programming and encryption).  Now we are doing Symbolic Calculus using the symbols library from Octave Forge!  We even threw in some plotting and programming our own user-defined functions! 

In fact, we used Octave as a scripted language by writing text files such as vector.m that we made executable (chmod 755 vector.m).  As long as the first uncommented line of the file read #!/usr/bin/octave –q, the octave interpreter would be invoked automagically!  We also used diary files such as vector.txt to print out the output of a given script.

My AP Computer Science students learned OOPs programming with Java this year.  So, their final project is learning OOPs in C++ (GNU GCC g++)!

Good Luck,
A. Jorge Garcia 

No comments:

Post a Comment