[OS X TeX] Matlab LaTeX tool (trying to sell a free tool!)

Peder Axensten peder at axensten.se
Sun May 14 19:46:09 CEST 2006


Only of interest to Matlab users.

I've uploaded a Matlab tool for exporting results into LaTeX  
documents. It creates a LaTeX document with a 'newcommand' for each  
variable you give it. Somewhere in the beginning of your LaTeX  
document you do a \include{...} and then you may use the values  
wherever you want. The simplest example would be:

--- In Matlab m-file ---------------------------------------------------
varname= pi/2;
latexcmd('myresults', varname);
--- In your LaTeX file -------------------------------------------------
\include{myresults}
[and somewhere later]
The result of the calculations is \varname. As you can ...
------------------------------------------------------------------------

You may have as many variables as you please in your call to  
latexcmd, of course. And you may add to an existing latexcmd file by  
prefixing the file name by '>': latexcmd('>results', var1, var2,  
var3, ...);

The variables may be of any type: complex, char, logical, arrays,  
cell arrays, structures, function handles etc. You can control the  
number of digits in the normal way, i.e. '%15.12f'. You may output a  
an array as a polynomial. And so forth. Well, if you are interested,  
have a look at it. An example file is included.
http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do? 
objectId=10434&objectType=FILE

I've also a tool to export figures as a *cropped* pdf (the normal  
Matlab export leaves a lot of white space around the figure):
http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do? 
objectId=10889&objectType=FILE

If you have suggestions or bug reports, please let me know!
Actually, if you like it: write a review! And if you don't like it:  
mail me and I'll see what I can do to improve! ;-)

Regards,
/Peder

------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
          & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/




More information about the macostex-archives mailing list