\documentclass[12pt]{article}

\begin{document}

\Large

\begin{center}

Psychology 593: Computing and Data Analysis with R and Matlab

Spring 2012

Wednesday, 3-5; Psychology Room 819


\bigskip


Instructor: Lawrence Hubert

Psychology Room 433

Office Hours: 1-3, Wednesday

\end{center}

\large

This course will emphasize statistical programming in Matlab (primarily), and in a fairly in-depth manner.  In addition, there will be substantial discussion about reading C (and C++), Fortran, and R code, and on translating legacy code into Matlab proper.

The class will begin with a review of basic Matlab, with an emphasis on graphics and creating graphical user interfaces.  The major part of the course will be in translating mathematical/statistical approaches into implementable code.  When necessary, the various routines from the Optimization Toolbox will be incorporated into the computational routines.



\large

\bigskip

\bigskip

Class Topics Sequence:

\bigskip

I. Introduction to Matlab:

\smallskip

Nine short videos:

1) Getting started with Matlab

2) Working in the development environment

3) Writing a Matlab program

4) Importing data from files

5) Creating a basic plot interactively

6) Using basic plotting functions

7) Working with arrays

8) Introducing Matlab fundamental classes (data types)

9) Introducing structures and cell arrays

\smallskip

Webinar (from Mathworks) (60 minutes): Introduction to Matlab

\bigskip

II. Introduction to Matlab programming:

\smallskip

Selected slides on programming from ``The Briefest of Introductions to Matlab''

\smallskip

Chapter 11 on Control Flow from Hanselman and Littlefield (\emph{Mastering Matlab})

\smallskip

Chapter 10 on Relational and Logical Operations

\bigskip

III.  (Multiple Classes) Case study -- The Dykstra-Kaczmarz method for solving linear (in)equality constrained least-squares tasks:

\smallskip

a) Theory

b) Application to \verb+linfitac.m+

c) The general M-file for solving inequality constrained least-squares tasks

d) Application to \verb+linfitac_altcomp.m+; \verb+linear_order_member.m+, \verb+partititonfit_addcon.m+, and \verb+dykstra.m+

e) Translating the Fortran code to Matlab

\bigskip

IV.  (Several classes) Getting Started (Chapter 3: Graphics):

\smallskip

a) Basic plotting functions (command line) (3-58 to 3-96)

b) Working with the graphics editor (Illustrator analogue) (3-1 to 3-57)

\bigskip

V. (Multiple classes) Case study -- The dynamic programming approach to seriation:

\smallskip

a) Theory

b) Fortran (90) implementation: \verb+DPSE1U.for+

c) Matlab implementation: \verb+uniscaldp.m+

d) Calling Fortran routines from Matlab: \verb+uniscaldpf.m+, \verb+uscalfor.for+, \verb+uscalforgw.for+

\bigskip

VI. Graphical user interfaces:

\smallskip

a) Matlab video(s)

b) GUIDE (Chapters 1 and 2 in Creating Graphical User Interfaces)

c) GUI Layout Toolbox

\bigskip

VII.  Incorporating optimization routines from the Optimization Toolbox

\smallskip

a) \verb+unifitl2nlp.m+: external function is \verb+objfunl2.m+; uses \verb+fmincon.m+

\verb+linfitl1.m+; uses \verb+linprog.m+

\verb+lpfit.m+: uses \verb+fmincon.m+; internal nested function calculates Minkowski distances

b) Section 32.12: Nonlinear curve fitting (Hanselman/Littlefield, \emph{Mastering Matlab}); uses \verb+fminsearch.m+ (without derivatives)

c) \verb+lsqnonlin.m+ (nonlinear least squares)

\bigskip

VIII.  Desktop tools and development environment/programming style:

\smallskip

a) Profiler; M-lint

b) \emph{Matlab programming style guidelines} and \emph{The Elements of Matlab Style}; both by Richard Johnson

\bigskip

IX.  R analogues of Matlab:

\smallskip

Matlab / R Reference (David Hiebeler)

\bigskip

X. Introduction to Fortran 90 programming:

\smallskip

Fortran 90 Tutorial by C.-K. Shene

\bigskip

XI.  Introduction to C (C++) programming:

\smallskip

Part 1: Introduction to C++ Programming (pp.\ 7--62)

\emph{C++ for Dummies} (Stephen Davis)

\smallskip

Use the Code::Blocks environment and the GNU GCC compiler (www.codeblocks.org)

Use the Matlab Compiler to distribute your program

Or, use the Matlab Compiler to turn your Matlab program into C++ code







\end{document} 