Matlab: Matlabplots in Latex (MATLABTIKZ)

Matlabplots in Latex (MATLABTIKZ)

(German) If you use Latex and want to include a graphic in scalable size and the font and style of your latex document, you need MATLABTIKZ. The implement is as follows:


h(1) = figure(1);

...

matlab2tikz('runge.tikz', 'height', '\figureheight', 'width','\figurewidth', 'figurehandle', h(1));

The packages that are needed in latex:

\usepackage{pgfplots}

\usepackage{grffile}

\pgfplotsset{compat=newest}

\usetikzlibrary{plotmarks}

\usepgfplotslibrary{polar}

\usepgfplotslibrary{patchplots}

To include pictures:
\begin{figure}[H]
\newlength\figureheight\setlength\figureheight{5.5cm}
\newlength\figurewidth\setlength\figurewidth{0.65\textwidth}
\input{runge.tikz}
\captionof{figure}{Runge-Kutta-Verfahren 2. Ordnung}
\end{figure}



On this Page it's written to ad --shell-escape to the command pdflatex
      pdflatex.exe -synctex=1 -interaction=nonstopmode --shell-escape %.tex

Sometimes one needs this if the memory size is to small: Open command line (cmd)
    initexmf --edit-config-file=pdflatex
Add this to the texxt file
    main_memory=79999999 
    save_size=79999
    extra_mem_bot=79999999 
    extra_mem_top=79999999 
    font_mem_size=799999
    pool_size=7999999
    buf_size=7999999
    EnableWrite18=p
    stack-size=200000
    max-strings=79999999
and close and save it with
    initexmf --dump=pdflatex

Kommentare

Beliebte Posts aus diesem Blog

Easy Plots in HTML/PHP with Google Charts

Matlab: 3D Coordinate System Rotations with Vectors

Matlab: Dijkstra methode - shortest way on gradient (small neighborhood)