HOW TO PUT MATLAB CODE IN LATEX

% LaTeX settings for MATLAB code listings
% based on Ted Pavlic's settings in http://web links.tedpavlic.com/ascii/homework_new_tex.ascii
usepackagelistings
usepackagecolor
% This is the shade supplied for MATLAB comments below
definecolorMyDarkGreenrgb0.0,0.4,0.0
% For quicker handling, load Matlab syntaxes for listings
lstloadlanguagesMatlab%
lstsetlanguage=Matlab, % Use MATLAB
frame=single, % Single frame approximately code
basicstyle=small tfamily members, % Use tiny true type font
keywordstyle=<1>colorBluefseries, % MATLAB functions bold and also blue
keywordstyle=<2>colorPurple, % MATLAB feature arguments purple
keywordstyle=<3>colorBlueunderbar, % User functions underlined and blue
identifierstyle=, % Nopoint one-of-a-kind about identifiers
% Comments tiny dark green courier
commentstyle=usefontT1pcrmslcolorMyDarkGreenlittle,
stringstyle=colorPurple, % Strings are purple
showstringspaces=false, % Don't put marks in string spaces
tabsize=5, % 5 spaces per tab
%
%%% Put conventional MATLAB functions not had in the default
%%% language here
morekeywords=xlim,ylim,var,alpha,factorial,poissrnd,normpdf,normcdf,
%
%%% Put MATLAB attribute parameters here
morekeywords=<2>on, off, interp,
%
%%% Put user characterized attributes here
morekeywords=<3>FindESS, homework_example,
%
morecomment=..., % Line continuation (...) favor blue comment
numbers=left, % Line numbers on left
firstnumber=1, % Line numbers start through line 1
numberstyle= inycolorBlue, % Line numbers are blue
stepnumber=5 % Line numbers go in steps of 5
% Includes a MATLAB script.
% The initially parameter is the label, which likewise is the name of the script
% without the .m.
% The second parameter is the optional inscription.
ewcommandmatlabscript<2>
eginitemizeitem<>lstinputlisting#1.menditemize