matlab_tutorial

matlab_tutorial - Introduction to Matlab Alexander...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Introduction to Matlab Alexander Philipov, aphilipo@gmu.edu September 3, 2009 1 Objectives Learn: The matlab interface: command window, workspace, help browser, matlab data and variable types, operators, functions, types of matlab files and loading data, creating matlab programs and functions, matlab graphs and visualization. 2 Examples: 1. Load text, comma-separated (csv), and matlab data files 2. Create descriptive statistics program 3. Create OLS regression program 4. Compute efficient frontier under unconstrained optimization 5. Compute efficient frontier under constrained optimization 6. Use the financial toolbox to compute the efficient frontier 7. Program the Black-Scholes option pricing formula 8. Create program to compute implied volatility 9. Use the financial toolbox to compute the option price and implied volatility 10. Create program for simulating from N ( , 2 ) distribution 1 3 The Matlab Environment 3.1 What is Matlab? MATLAB is a high-performance language for technical computing. It integrates compu- tation, visualization, and programming in an easy-to-use environment where problems and solutions are expressed in familiar mathematical notation. With Matlab, one can program with matrix and vector formulations in a fraction of the time it would take to write a program in a scalar noninteractive language such as C or Fortran. Toolboxes are comprehensive collections of MATLAB functions (M-files) that extend the MATLAB environment to solve particular classes of problems. 3.2 The MATLAB System The MATLAB system consists of five main parts: 1. Development Environment This is the set of tools and facilities that help you use MATLAB functions and files. Many of these tools are graphical user interfaces. It includes the MATLAB desktop and Command Window, a command history, an editor and debugger, and browsers for viewing help, the workspace, files, and the search path. 2. The MATLAB Mathematical Function Library. This is a vast collection of compu- tational algorithms ranging from elementary functions like sum, sine, cosine, and complex arithmetic, to more sophisticated functions like matrix inverse, matrix eigenvalues, Bessel functions, and fast Fourier transforms. 3. The MATLAB Language. This is a high-level matrix/array language with control flow statements, functions, data structures, input/output, and object-oriented pro- gramming features. It allows both programming in the small to rapidly create quick and dirty throw-away programs, and programming in the large to create complete large and complex application programs. 4. Graphics. MATLAB has extensive facilities for displaying vectors and matrices as graphs, as well as annotating and printing these graphs. It includes high-level 2 functions for twodimensional and three-dimensional data visualization, image pro- cessing, animation, and presentation graphics. It also includes low-level functions that allow you to fully customize the appearance of graphics as well as to build...
View Full Document

This note was uploaded on 02/29/2012 for the course FINA 6275 taught by Professor Gerganajostova during the Spring '12 term at GWU.

Page1 / 28

matlab_tutorial - Introduction to Matlab Alexander...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online