\documentclass{handout}
\SetInstructor{Instructor Name Here}
\SetCourseTitle{Course Title Here}
\SetHandoutTitle{Handout Title Here}
\SetSemester{Semester Here}
\SetDueDate{Due Date Here}

\begin{document}

\maketitleinst

or

\maketitle


Optionally, you may include either of the above titling in your document with the commands \verb!\maketitleinst! or \verb!\maketitle! respectively.

Here are some examples of the added commands. These commands must be run from \textbf{within a math environment}:

\begin{enumerate}

\item \verb!\mb{x}! applies the \verb!\mathbf{}! command to the argument. This example would result in $\mb{x}$.

\item \verb!\mat{a & b \\ c & d}! would produce
$\mat{a & b \\ c & d}$.

\item \verb!\pd{X}{t}! produces the partial derivative $\pd{X}{t}$. Arguments can be skipped, \verb!\pd{}{t}! yields $\pd{}{t}$.  The second partial derivative would be written as \verb!\pd{^2X}{t^2}! yielding $\pd{^2X}{t^2}$.

\end{enumerate}

\section{Code Listings}

The handout class uses the \emph{listings} package. You should make become familiar with it and its options.  The handout class defines a series of options to format the code listing in a consistent manor. You can override any of these configurations with calls to \emph{lstlist}.

The handout class also defined the following environments to specify the code listing's language, these environments are:

\begin{enumerate}
\item matlabCode
\item cCode
\item javaCode
\item fortranCode
\item latexCode
\item noCode
\end{enumerate}

All these environments take a second argument. This second argument is passed to a \emph{lstlist} command, it may be left blank.  For example to specify a caption for the listing.

\begin{latexCode}{}
\begin{matlabCode}{caption={This is a caption}}
	matlab code here
\end{matlabCode}
\end{latexCode}

for the listing to be a float, have a captions and a label:
\begin{latexCode}{}
\begin{matlabCode}{float, caption={This is a caption}, label=samplecode}
	matlab code here
\end{matlabCode}
\end{latexCode}

\subsection{MATLAB}

The following Latex

\begin{latexCode}{}
\begin{matlabCode}{}
% This function models a mass-spring-damper system
function xdot = smd(t,x)
 m = 1;
 b = 0.05;
 k = 0.5;
 xdot = [0 1; -b/m -k/m]*x;
\end{matlabCode}
\end{latexCode}

produces...
\begin{matlabCode}{}
% This function models a mass-spring-damper system
function xdot = smd(t,x)
 m = 1;
 b = 0.05;
 k = 0.5;
 xdot = [0 1; -b/m -k/m]*x;
\end{matlabCode}


\end{document}