1Applying Matlab 22/1/20082Opening Discussion■What did we talk about last class?■Do you have any questions about the reading?3Functions■Matlab functions are a bit different from what you are used to in other languages. They can take a variable number of arguments and return a variable number of arguments.■To return a value, we set a variable with the name specified on the first line of the function to the value we want to return. That is what will be returned when the function terminates.■You can also have local functions or nested functions. When either of these is used the main function must be terminated with end.■Function handles are also discussed in the book and they are worth noting.4Writing a Function■We have our Matlab code to do the iteration for a single pixel of the mandelbrot set. Now make an m-file and put that code into the m-file as a function that takes a point and returns how many iterations it went.■Let's try to write code that will plot up a full Mandelbrot set for us.5Basic Stat Analysis■As you have already experienced, Matlab has a set of statistical analysis methods.meanmaxminstdcov – covariancecorrcoef – correlation coefficientsdiffsumMore on page 3096Basic Data Analysis■Matlab also provides filtering functions that combine elements in arrays in various ways that you can specify.■The filter function does linear combinations of elements in an array.7Closing Remarks■It's a while before we have anything due.■Do you feel that we are going at a pace that you can keep up
View Full Document