{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 ...

learn more… | top users | synonyms

1
vote
1answer
258 views

pdflatex amd Matlab LaTeX interpreter alternative to psfrag?

I use TexWorks that comes together with Tex Live 2012. After having read a lot on how to use "something similar" to psfrag with pdflatex, I have almost found my way. I have just discovered the ...
1
vote
1answer
155 views

Inserted images come before text and code [duplicate]

I am typing up some loose ends in my LaTeX code, and I have come far with help from here. The last things I need help with are some formatting subtleties that I cannot solve. Basically, I am trying ...
5
votes
1answer
638 views

TikZ to PDF from the command line

I am generating TikZ files using figures from MATLAB (using a MATLAB function from the stack exchange). I then open these files using TikzEdt, and generate the PDF file. Is there a way to make it ...
1
vote
1answer
438 views

Need to show MATLAB code in TeX document, using pdfLaTeX [duplicate]

I am trying to make a simple document, showing MATLAB code, and some images. This is my template that I am using. \documentclass{article} \usepackage{graphicx} \usepackage{float} ...
0
votes
1answer
179 views

Nearest-neighbour surface plot from matlab2tikz fails with colormap

I load an external custom colormap with \input{coolwarm_.map} I have a range of complex surface plots created with matlab2tikz which use this colormap and compile successfully. One does not. It ...
0
votes
1answer
194 views

TikZ legend changes the line legend into a rectangle legend

I am using TikZ to insert MATLAB figures but the problem is that I have two legends one is a line and the other is a rectangle. When I insert it, both look like a rectangle. How should I correct it ?
5
votes
2answers
3k views

Matlab LaTeX Interpreter: Minus sign in subscript or in superscript

In general, using Matlab with the LaTeX interpreter works fine. Today I focus a really stupid bug in the visualization of the minus sign. In Matlab I write a text with the LaTeX string $K_{-1}$ and ...
5
votes
2answers
805 views

Tikz-pgfplots and matlab2tikz doesn't capture subplots well

I use matlab2tikz to convert this matrlab figure: % This file was created by matlab2tikz v0.3.3. % Copyright (c) 2008--2013, Nico Schlömer <nico.schloemer@gmail.com> % All rights reserved. % ...
6
votes
2answers
401 views

A\b Using mcode package

How do I typeset "x=A\b" in mcode, which represents "matrix division" in MATLAB? Here is a MWE: \documentclass[12pt]{report} \usepackage{amsthm,amsmath, amssymb, paralist, fancybox, listings, ...
5
votes
1answer
307 views

The % symbol overlaps inside a listing with MatLab code

I'm using the listings package to insert MatLab routines that I've created for some papers I need to write. Everything works awesome, except the symbol % (comment in MatLab) which overlaps with the ...
4
votes
1answer
981 views

Dimension too large after exporting box plot with matlab2tikz

When exporting a box plot with matlab2tikz I get no errors, but when running pdflatex I get a "dimension too large" error. This only happens with box plots. Still the box plot shows up as it should, ...
0
votes
1answer
179 views

Long codes using listing or mcode which do not break into 2 pages

I'm using the mcode package for including my codes into my documents, but the problem is that when my codes are too long, and they need more than one page the program tries to keep them in one page, ...
1
vote
1answer
2k views

Translating Matlab figures into TikZ

When ever I want to write a research paper and print the simulated results (by Matlab) into an .eps file, I think of a direct way of translating Matlab fig files into LaTeX (especially TikZ). Is ...
3
votes
1answer
3k views

Replacing axis labels with text in Tikz

I am plotting 11 points in a scatter plot in Matlab and replacing the x-axis labels 1 - 11 with strings using: figure; grid on; hold on; box on; scatter(2:10,100*d1(1,:),'rs','filled'); ...
3
votes
1answer
882 views

Undefined control sequence \text when importing Matlab figures

I'm following a tutorial to import Matlab figures through tikz, however after trying to compile the .tex file I get the following error: ABD: EveryShipout initializing macros (./mysphere.tikz ! ...
8
votes
3answers
990 views

draw Fourier Series Expansion with tikz/pgfplots

This is a MATLAB code T=0.3; A=0.3; t=0:0.01:4*T; n1=length(t); N=100; s=0; signal=0; for i=1:n1 s=0; for n=1:N s=s+A*4/(pi*(2*n-1))*sin(2*pi*(2*n-1)/T*t(i)); end signal(i)=s; end plot(t,signal); ...
7
votes
1answer
1k views

.eps file generated by matlab not centered correctly

Everything is all right before I updated all my MiKTeX package to latest version. But after that, I find that all .eps file generated by Matlab cannot be shown correctly. For example. I use Matlab to ...
2
votes
1answer
995 views

psfragfig pdflatex image shifted and cropped

Some images inserted with psfragfig, are shifted to one side (right) and partially placed off the document. (see image, bottom figure is the one I'm talking about). It occurs with TexShop whether I ...
3
votes
3answers
2k 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
94 views

Editing math.py for pygment [closed]

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, ...
2
votes
2answers
483 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} ...
2
votes
1answer
374 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
54 views

A question on consistency of fonts in figures and in text [duplicate]

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 ...
7
votes
1answer
14k 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? ...
0
votes
1answer
393 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})] ...
2
votes
1answer
445 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
139 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 * ...
1
vote
2answers
378 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 ...
5
votes
1answer
915 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 ...
1
vote
1answer
306 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 ...
4
votes
1answer
107 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). ...
6
votes
1answer
2k 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
0answers
235 views

Weaving MATLAB m-file into a LaTeX File [duplicate]

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 ...
5
votes
1answer
2k 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
2answers
903 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
317 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 ...
3
votes
3answers
1k 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
3k 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
2k 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 ...
6
votes
1answer
713 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?
2
votes
1answer
3k 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:
5
votes
1answer
332 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) ...
2
votes
1answer
1k 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
44 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 ...
14
votes
3answers
10k 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 ...
1
vote
1answer
173 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
0answers
126 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
264 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
686 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 ...
32
votes
3answers
22k views

What can I use to typeset MATLAB code in my document?

This question led to a new package: matlab-prettifier Does anybody have a quick and easy way to typeset some relatively long MATLAB code in the appendix? I looked up a few methods, and the ...