Monday, June 29, 2009

MATLAB Work

In order to understand how to better use MATLAB I carefully went through Carrie's code used for her original analysis. As I went through I tried to make sure I understood what every function and calculation was used for. After gaining a solid foundation in using the basic functions of MATLAB I began going over Professor Xue's SMS 595 lecture notes.

I worked through the first two lectures making sure I knew the basics of linear regression and understood how to interpret the results Carrie and I would be seeing. In order to better understand the regression function Carrie and I would be using in MATLAB I anaylzed a data set givien to Carrie in SMS 595 as homework. The funtion in MATLAB that Carrie and I are using gives several sets of statistics without clear definitions of their identities and purposes. Using Professor Xue's notes however I was able to match up the numbers given in MATLAB to the explanations in Professor Xue's notes and gain a better understanding of the "regress" function.

After that I began work on the time consuming yet useful task of reproducing Carrie's original regression results. Without looking at Carrie's code I used Professor Xue's notes and the Help files in MATLAB to write my own program to load, split, preform a regression on, and plot the 8-day Chlorophyll area averaged data. After my program for the 8-day data was finished it was short work to load and modify the monthly averaged data so it would run using mostly the same code.

I also began work on analyzing the extremes in the chlorophyll data. For quite some time I expirimented with ways of doing this in MATLAB since I couldn't find a specific premade function. I wrote a program that could be used to find the highest chlorophyll concentration between certain times that worked but ultimately I found to be a waste. By far the easiest way to find the extremes with this data is to just use the data cursor in the figure window to select the point at the peak in each season and make a matrix from the x and y values it gives you.

No comments:

Post a Comment