A program called tgrind is available in the sipb locker to help you convert matlab program listings to a form easily includable in a LaTeX document. To use this program, type at the prompt:
To include this file in your document:
- Edit the output from tgrind to remove the first ("\input tgrindmac") and last ("\vfill\eject\end") lines from the file.
- Make sure you have the tgrind documentstyle option specified. (Include tgrind in the square brackets in the \documentstyle command at the top of your file.)
- Place the line
in your .tex file where you want to insert the formatted code.