Course Notes Main Page

This web site contains course notes for a basic introduction to Matlab

Initially this page is really just a list of the topics I want to / have talk(ed) about, without any real coverage here of any particular topic.

- This version of these course notes was modified Summer 2014 by John Bell, for CS 109 at the University of Illinois Chicago.
- This semester does not require a textbook on Matlab, relying heavily instead on online and built-in documentation.
- Past textbooks include "Essential MATLAB for Engineers and Scientists", Fourth Edition ,by Hahn & Valentine and Introduction to Matlab", Second Edition, by Delores M. Etter. Some of this material may be based loosely on those sources.

- Introduction
- Basics of getting, installing, and running Matlab.
- How to get and install a Virtual Private Network
- The Matlab Environment ( IDE )
- Survey of the Matlab desktop and capabilities.
- How to save Matlab commands in a script file and run that file.
- A Simple Sample - Explained line by line.
- Getting Started with Matlab
**Helpwin:**- general( who, whos, clear )
- ops( colon, paren, punct, and all Arithmetic except kron )
- elmat( ans, eps, pi, i, inf, nan, disp )
- input

- Valuable commands
- pre-defined variables
- Special Characters
- Mathematical Operators
- Input and Output
- Creating and running scripts
- Creating Matrices with Matlab
**Helpwin:**- elmat( zeros, ones, eye, linspace, logspace, end, magic, peaks )
- ops( colon, paren )

- Direct Entry
- Colon Operator
- Subset or Combination of other arrays
- Using Matlab Functions
- Load from a file

- Using Matlab Functions
**Helpwin:****elfun**- datafun
- matfun
- polyfun
- specfun

- Basic Matrix Operations
**Helpwin:**- elmat( repmat, size,length, ndims, numel, diag, tril, triu, fliplr, flipud, rot90 )

- Control Structures
- Relational Operators - >,<,>=,<=,= =, ~ =
- Logical Operators - &, |, ~ for AND, OR, NOT
- if - elseif - else - end
- while and for loops
- find
- switch
- menus

- User Defined Functions
- Plotting
- Using Matlab to Plot Data from ASCII Files ( Appendix C from C++ book "Engineering Problem Solving with C++", Third Edition, by Etter & Ingber )

- Use load to load in the data, : to extract columns ( or other subsets ), and the plotting tools to plot.

- Matrix Computations
- Matrix multiplication, inverse, determinant, solution of equations, Gaussian elimination, etc.

- Beyond the Scope of These Notes:
- Simulink and a number of other toolkits available as add-ons.
- Matlab has low-level file I/O operations fopen, fwrite, fread, feof, fseek,and fclose.
- Special Matlab functions exist for reading and writing special format files, such as fprintf, csvread, csvwrite, dlmread,dlmwrite, fgets, fscanf, textread, xlsread, imread, etc.

Items below this line are under development