# latexcmd 1.0

OS : Windows / Linux / Mac OS / BSD / Solaris

Script Licensing : Freeware

Created : Sep 28, 2007

Downloads : 4

Thank you for voting...

## USAGE: latexcmd(filename, var1, var2, ...) <br ...

USAGE: latexcmd by Peder Axensten(filename, var1, var2, . . . )

Creates a LaTeX file with commands named as the corresponding Matlab variables. Include the resulting LaTeX file into your LaTeX document (by an include{filename}) to access the variable values. Works on scalars, polynomials, numeric arrays, cell arrays, and structures. Also works with most types: number (real and complex), NaN, Inf, strings, syms (from the Symbolic Toolbox), function handles, and inlines (although functions look flat without the Symbolic TB).

If you find any errors, please let me know (peder at axensten dot se)!

INSPIRATION: latexcmd 1.0 has the functionality of the similar m-files latex, matrix2latex, MAT2TEX, latex_trick, mat2textable, but works on more variable and number types, and has a more flexible number format, when required. It can also save as many variables as you want in one file, as opposed to one file per variable in some older related m-files.

ARGUMENTS:

filename must be a string. If prefixed by '>' (i. e. '>filename'), the results will be appended to previous file contents. If empty, results will be printed on the display.

var may be any of the following:

Arrays must be max 2-dimensional.

Cell arrays may not be nested (contain structures or arrays).

Structures generates a header with field names, followed by hline, followed by actual values.

Character strings:

- 'myname': The name of the next expression.

- '@myprefix': The prefix of the following names.

- '%myformat': Defines a new active number format (e. g. '. 5E'). Specials: '%r': fractions format of numbers (using rat). '%R': fractions format of numbers (using rat) with integer part. '%ns': power of ten suffix (e. g. , k, M, etc. ) (n is number of digits). '%nS': 'scientific notation', exponent multiple of 3. '%u & %g & %5. 2f%%' formats array columns individually.

- '%stat': Statistics of the following array (all of it, not column-wise): length, min, max, range, mean, median, std, cov, and all of it collectively (see latexcmd [latexcmd1.0.exe]_example. m). If the next expression is non-numeric, '%stat' will be ignored.

- '%poly': Outputs the following array as a polynomial of 'x'.

- '%poly:myvar': Outputs the following array as a polynomial of myvar.

- Other strings will be output as they are.

EXAMPLE (See 'help latexcmd - 0MB_example' for more detailed examples. ):

--- In matlab m-file ---------------------------------------------------

result= [1 2 3 4 5 6];

resultmean= mean(result);

latexcmd 1.0(results, result, resultmean);

--- In your LaTeX file -------------------------------------------------

include{results}

[and somewhere later]

The mean of the measurements is esultmean, with individual results:

egin{tabular}{r@{, }r@{, }r@{, }r@{, }r@{, and }r}esultend{tabular}

Creates a LaTeX file with commands named as the corresponding Matlab variables. Include the resulting LaTeX file into your LaTeX document (by an include{filename}) to access the variable values. Works on scalars, polynomials, numeric arrays, cell arrays, and structures. Also works with most types: number (real and complex), NaN, Inf, strings, syms (from the Symbolic Toolbox), function handles, and inlines (although functions look flat without the Symbolic TB).

If you find any errors, please let me know (peder at axensten dot se)!

INSPIRATION: latexcmd 1.0 has the functionality of the similar m-files latex, matrix2latex, MAT2TEX, latex_trick, mat2textable, but works on more variable and number types, and has a more flexible number format, when required. It can also save as many variables as you want in one file, as opposed to one file per variable in some older related m-files.

ARGUMENTS:

filename must be a string. If prefixed by '>' (i. e. '>filename'), the results will be appended to previous file contents. If empty, results will be printed on the display.

var may be any of the following:

Arrays must be max 2-dimensional.

Cell arrays may not be nested (contain structures or arrays).

Structures generates a header with field names, followed by hline, followed by actual values.

Character strings:

- 'myname': The name of the next expression.

- '@myprefix': The prefix of the following names.

- '%myformat': Defines a new active number format (e. g. '. 5E'). Specials: '%r': fractions format of numbers (using rat). '%R': fractions format of numbers (using rat) with integer part. '%ns': power of ten suffix (e. g. , k, M, etc. ) (n is number of digits). '%nS': 'scientific notation', exponent multiple of 3. '%u & %g & %5. 2f%%' formats array columns individually.

- '%stat': Statistics of the following array (all of it, not column-wise): length, min, max, range, mean, median, std, cov, and all of it collectively (see latexcmd [latexcmd1.0.exe]_example. m). If the next expression is non-numeric, '%stat' will be ignored.

- '%poly': Outputs the following array as a polynomial of 'x'.

- '%poly:myvar': Outputs the following array as a polynomial of myvar.

- Other strings will be output as they are.

EXAMPLE (See 'help latexcmd - 0MB_example' for more detailed examples. ):

--- In matlab m-file ---------------------------------------------------

result= [1 2 3 4 5 6];

resultmean= mean(result);

latexcmd 1.0(results, result, resultmean);

--- In your LaTeX file -------------------------------------------------

include{results}

[and somewhere later]

The mean of the measurements is esultmean, with individual results:

egin{tabular}{r@{, }r@{, }r@{, }r@{, }r@{, and }r}esultend{tabular}

**• MATLAB Release: R14SP1**

**Demands:****latexcmd 1.0 scripting tags:**format, matlab, file, latexcmd, arrays, scientific engineering, latex cmd, matlab latex, number.

**What is new in latexcmd 1.0 software script?**- Unable to find latexcmd 1.0 news.

**What is improvements are expecting?**Newly-made latexcmd 1.1 will be downloaded from here. You may download directly. Please write the reviews of the latexcmd. License limitations are unspecified.