{matlab} is a high-level scientific programming language with JAVA based interactive environment that enables you to perform computationally intensive tasks as done with traditional programming languages such as C, C++, and Fortran. Its full form is MATrix LABoratory as it uses matrix (linear ...
3
votes
3answers
109 views
Insert text inside a image in eps format
UPDATE:I tried the solution with overpic and it works fine. But the problem is, sometimes, my experimental setup changes and I have to reproduce the eps file using different parameters from Matlab. ...
2
votes
0answers
40 views
Editing math.py for pygment
I'm using the minted package to syntax my code. When I'm doing so in I'm using the Matlab language. When to continue on the next line, we do so in Matlab by entering ... before the next row. However, ...
1
vote
0answers
118 views
How can I customize a plot produced by matlab and exported by matlab2tikz script as I would do with subfigures and the \includegraphics command?
I.e: I had my plots arranged with a 3-in-a-row style with this code:
\begin{figure*}
\centering
\subfigure[Figure A]{\includegraphics[width=55mm]{a.jpg}}
\subfigure[Figure ...
9
votes
2answers
2k views
inserting MATLAB code in the appendix
Does anybody have a quick and easy way to insert a large MATLAB code into the appendix? I looked up a few methods like mcode.sty but it doesn't seem to be active anymore. I have a ton of equations ...
1
vote
2answers
69 views
Problems with mdframed
I am trying to put a box around matlab code but the bottom of the box sits extremely close to the next line. I try a line break but it does not work. Any ideas?
\documentclass[a4paper,12pt]{article}
...
27
votes
9answers
9k views
What is the best way to include Matlab graphics?
Which way of exporting Matlab graphics delivers the best result for inclusion in LaTeX? Is it possible to export scalable vector graphics, or even LaTeX graphics?
2
votes
1answer
127 views
Intersecting planes not shown correctly with TikZ
I made a plot in MATLAB of a deformed and an undeformed model. I converted the figure to TikZ using matlab2tikz and added it to my .tex file. I then noticed that the two configurations, which are ...
0
votes
0answers
41 views
A question on consistency of fonts in figures and in text
Suppose I output a figure of some function from Matlab, without adding the x-axis label and y-axis label. The figure is then saved as a PDF file.
Now I want to input this figure into LaTeX, and I ...
1
vote
0answers
120 views
How can I insert latex symbols into a matlab plot?
I have a figure in matlab with axes that I would like to label with latex symbols like $\delta$ on the x axis and $\epsilon$ on the y axis. How can I place these latex notations into the axis labels?
...
23
votes
10answers
11k views
How to avoid large margins around Matlab plot in PDF
I am preparing image files to be included in a latex document. The image file is generated by printing a Matlab plot.
If I print the plot in eps format, the content of the eps file is fully occupied ...
0
votes
1answer
67 views
Plotting from MATLAB with matfig2pgf: some plots do not show up in the pdf
I am ploting from Matlab with matfig2pgf. I plot two lines put only part of them show up in the .pdf, once it's compiled:
dat1= [-500:1000, rand(1501,1}]
dat2= [-500:1000, cos(rand(1501,1})]
...
4
votes
4answers
627 views
Matlab to pdflatex with text properties
I know that this might be more a detail rather than a serious problem but I've already Googled it like crazy and I can't find the solution.
Is it possible to achieve a MATLAB plot in pdflatex with ...
1
vote
2answers
119 views
Figure is chopped off when inserting a MATLAB table as eps figure
I am trying to include a MATLAB UI table (which I have previously saved as an .eps figure and put it into the same folder as my .tex file) into a LaTeX document, using:
\begin{figure}
\centering
...
2
votes
1answer
197 views
Trouble including a Matlab surf plot (pdf or png) with pgfplots
I have successfully used \addplot graphics before. Now I have a surf plot in Matlab, which I exported as png and pdf and I would like to include the image with \addplot3 graphics.
I found some ...
2
votes
0answers
61 views
Turn preamble font declaration into a “oneliner” to be used in Matlab
I was already using x and y, and needed something similar, but different so I declared the following in my preamble:
\DeclareFontFamily{OT1}{pzc}{}
\DeclareFontShape{OT1}{pzc}{m}{it}{<-> s * ...
0
votes
0answers
122 views
Not enough room in an internal buffer latex Tikz [closed]
I'm trying to plot a graph using TikZ (matlab2tikz output) but when I put it inside a subfloat latex doesn't produce any output file and complaines about being out of internal buffer. Any ideas how I ...
0
votes
0answers
25 views
MATLAB \ operator in equations [duplicate]
Is there a short-cut to putting \ into a LaTeX equation, with \ being the MATLAB linear system operator?
4
votes
1answer
77 views
pdflatex of individual PDF images already containing pdfmark information
I'm using pdflatex to generate a document from hundreds of single-page PDF images. (The images are originally in Postscript but I use Ghostscript to convert them to PDF prior to running pdflatex). ...
4
votes
1answer
170 views
Including package to create MATLAB labels using LaTeX
When using LaTeX as the interpreter to typeset labels in MATLAB it would be great to be able to include packages to customize appearance. Is this possible?
As of now I know no method to create non ...
0
votes
1answer
97 views
Bug? Colored frame in mcode package
While using mcode.sty, I recognized that at linebreaks with long comments parts of the surrounding frame got colored green or were even left white at using mathematical formulas, e.g. in the following ...
2
votes
0answers
192 views
Weaving MATLAB m-file into a LaTeX File
Hopefully this is a simple question: is there a simple, fast, and general method of porting the the text of an m-file verbatim into LaTeX and have it appear as it does in VI, i.e. ignore all of the ...
33
votes
3answers
2k views
3-dimensional histogram in pgfplots
I have a simple 3d histogram
which I want to import into pgfplots, e.g. using matlab2tikz or by hand.
PGFplots does not offer 3d histograms.
Is there an easy way to do this?
3
votes
3answers
2k views
pstool, pdfLaTeX: Not getting pstool to work, “LaTeX Error: File not found”
I've spent lots of hours trying to solve a problem by myself. Unfortunately it seems that no one else has experienced the same problem. At least, searching through various forums and employing Google ...
6
votes
1answer
395 views
Setting math font size
MATLAB has the ability to "publish" code as an html document. It can include math by taking equations keyed in LaTeX notation, processing it with latex and embedding a bitmap image into the html. An ...
2
votes
3answers
464 views
Problems with including a tikz tex file generated by Octave (MatLab clone)
I have plotted a figure in Octave and printed it as a TikZ figure (see the device option) to a tex file called comparison_tikz.tex, and I have imported it into my document with the line
...
3
votes
1answer
332 views
Export eps figures modified by psfrag
I am not an expert on figure exports and, although I have been searching around quite a lot, I can't find the answer to my problem. During the writing of a journal article, I had the idea of using ...
2
votes
1answer
195 views
Bad font using \psfrag
I'm trying to include a figure that I made in MATLAB. I want to change the font using \psfrag, however there seems to be a problem when scaling the figure down. It keeps the font the same size as the ...
8
votes
0answers
301 views
Help on adjusting histogram plot created by TikZ [duplicate]
I am trying to create a tikzpicture similar to what I have made in MATLAB. MATLAB gives me the following result after running histogram:
myhistnorm = [ 0.1231 0 0 0 0 0 0 0.0001 0.0001 ...
6
votes
2answers
183 views
change code font using mcode package
I'm using mcode package to insert into my document matlab code. I would change the default font. what command I should use to get this font?
3
votes
3answers
329 views
Changing fraction style in LaTeX as generated by Matlab
A= [0.7577 0.7060 0.8235 0.4387 0.4898
0.7431 0.0318 0.6948 0.3816 0.4456
0.3922 0.2769 0.3171 0.7655 0.6463
0.6555 0.0462 0.9502 0.7952 ...
3
votes
2answers
492 views
Including a Matlab table in document
Using Matlab I got a table. Now I want to integrate in a LaTeX document. I assume it works like including an image in a document.
A = [1 2 3; 4 5 6; 7 8 9];
latex_table = latex(sym(A))
latex_table =
...
2
votes
1answer
463 views
matlab2tikz for surf plots: reducing data?
I was really happy to see that matlab2tikz also supports surf plots. Unfortunately, it produces too much data, so I run into the well-known memory problem. I tried compiling with lualatex instead of ...
2
votes
1answer
514 views
How to get Matlab code into a LaTeX document?
I'm trying to put in my thesis matlab code but the results are not very good. I would get something like that but I don't know what packages using and how to create this result:
11
votes
3answers
2k views
matlab figures with latex fonts
I realize this question might have been asked already, but I'm relatively new to LaTeX and matlab so I need some help.
I'm trying to export a figure for inclusion in my tex document (to be compiled ...
4
votes
1answer
169 views
matlab2tikz and bar3 function
If I use the function hist3() it perfectly works with matlab2tikz. But if I use
the function bar3 I find this in my matrix.tikz:
% This file was created by matlab2tikz v0.2.3.
% Copyright (c) ...
4
votes
1answer
1k views
Problem using matlab2tikz
I'm trying to get matlab2tikz to work. I want to use it for prettyfying output of Matlab's image() command.
In Matlab I tried
imagesc(rand(100));
xlabel('X');
ylabel('Y');
title('Random Colors');
...
2
votes
1answer
309 views
Minor ticks not showing when using matlab2tikz
I am using matlab2tikz to import MATLAB figures into TeX.
However I can't seem to get the x or y minor ticks to show in the document compiled by TeX. The MATLAB figure I have converted to .tikz have ...
2
votes
0answers
40 views
Aligning comments that break in several lines? [duplicate]
Possible Duplicate:
How to align comments with lstlistings?
I want to include Matlab code with long comments. The next MWE shows that it is achieved by using the listings package. However I ...
1
vote
1answer
94 views
pgfplots externalize and references: some work, some don't
I have started using the tikz externalization library for my current project. From here I learned to use
\pgfplotsset{invoke before crossref tikzpicture={\tikzexternaldisable},invoke after crossref ...
3
votes
2answers
737 views
Removing scientific notation in tikzpicture made by matlab2tikz
I am having a very hard time trying to figure out how to remove the scientific notations on the y-axis of my graphs. The graphs are made in MATLAB and then converted into TikZ files using the package ...
1
vote
0answers
103 views
Figures (pdf) do not contain any text in the final document [closed]
I am creating some plots in Matlab and saving them as pdf files. When I include these pdf files in latex (i am using MikTex and pdflatex) using \includegraphics, all text from plots (legends, xlabel, ...
5
votes
0answers
162 views
Plots from externalized TikZ are rotated [closed]
I just found out about tikzexternalize and I love it - well, almost. This is my situation: I have done simulations in Matlab and used
matlab2tikz
to get the plots from Matlab into my .tex document. ...
5
votes
2answers
344 views
Getting rid of \vspace{1em} from MATLAB LaTeX publish
When publishing an m-file from MATLAB to LaTeX, a vertical space of 1em is inserted after each text paragraph. I frequently input these published files directly into a master document by using the ...
6
votes
2answers
796 views
Putting in MATLAB codes in a box as figures?
how do I put MATLAB codes in a box or deal with them as if they are figures? Is there a way to do it within LaTeX itself? I am currently using the verbatim environment to present my codes and to be ...
8
votes
2answers
1k views
matlab2tikz - TeX out of memory
I am using matlab2tikz to import figures from MATLAB to tex.
However I quickly get the message TeX capacity exceeded, sorry [main memory size = 3000000].
I have tried expand main memory using ...
5
votes
1answer
1k views
Inline MATLAB code
I want to write MATLAB code in a sentence.
I installed package mcode, no problem if I want to display the code by inserting the code in environment \begin{verbatim} and \end{verbatim}.
How could I ...
3
votes
1answer
352 views
Inserting an image into a figure using psfrag
I'm trying to import figures from Matlab into a LaTeX document using PSFrag. For some of the figures I'd like to be able to add little images in particular places. I thought I'd be able to just add ...
3
votes
1answer
142 views
Splitting .tex file across pages when included as figure
I am trying to include a .tex file in my thesis. The file is some MATLAB code formatted to appear correctly in LaTeX.
The compiler throws a warning that the code is too long for the page, but it ...
2
votes
1answer
543 views
Editing matlab tikz figure
Matlab gave me this code for graph. I want to remove values from axes and add only my own values, which are \pi and \sqrt{2}. How to edit this code?
\begin{tikzpicture}
\begin{axis}[%
scale only ...
7
votes
1answer
416 views
pgfplots: color a surf using arbitrary colors
I am trying to figure out if there is an equivalent in pgfplots to what in MATLAB is done through the following command: surf(A,B). This would plot the geometry A, using the colors specified in B.
I ...



