{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

3
votes
0answers
61 views

eps import wrong title in graphic \pi looks like \neq

Need to import a figure from Matlab. I export it as an eps and use epstopdf to import it in latex for some unknown reasons the greek pi in the title of the plot that looks ok in the .eps does not ...
1
vote
0answers
66 views

Importing plots from MATLAB to LaTeX

This is my first time trying to import plots created by MATLAB into LaTeX and it's not turning out very nicely. I have saved my MATLAB plot as a .png file here and an .eps file here. Using the .eps ...
1
vote
1answer
201 views

Matlab->plot2svg->Inkscape->pdf+latex->includesvg = slow rendering pdf + large file. How to solve that?

I have the following workflow. I use matlab to produce 3D plots with transparency and I want to use the workflow of setting the text inside the figure in latex. I am using Texniccenter and MikTex the ...
4
votes
1answer
692 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, ...
44
votes
4answers
4k 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?
4
votes
1answer
166 views

Draw lines inside tikz plot (exported from matlab), independent of coordinate system

I am exporting plots from matlab with the matlab2tikz package. While this works just fine, I now want to insert some lines and text to describe the plot. I have multiple plots which are to be labelled ...
4
votes
3answers
143 views

How to get listing to print only the header of a Matlab file?

How to extract the first line of a simple matlab file and the following lines just after that begin with the character % ? The number of lines to extract is unknown. Then I want to use listingsutf8 to ...
3
votes
2answers
77 views

clash between mcode and scrbook

I want to include Matlab code in my document. The mcode package used to do a great job in combination with my scrbook document class. However, I recently updated my KOMAscript family to version 3.12 ...
9
votes
2answers
3k 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 ...
1
vote
0answers
23 views

Using mcode within a beamer frame [duplicate]

I have a presentation that I would like to include some matlab code in. For that purpose I have included the mcode package, that basically configures the listings package. My problem is that the ...
23
votes
3answers
13k views

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

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 mcode package emerged as a possibility, but it seems to be ...
7
votes
1answer
6k 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? ...
6
votes
1answer
278 views

How can I get proper Matlab syntax when typesetting Matlab source code using the algorithm package?

I'm currently using the algorithm package for typesetting Matlab source code in my document. However, the way keywords are typeset doesn't match the Matlab syntax. For instance, \EndFor is typeset as ...
7
votes
3answers
1k views

Putting in MATLAB codes in a box as figures? [duplicate]

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 ...
5
votes
3answers
2k 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
78 views

error:out of memory error in matlab [closed]

I am trying to write a matlab code for image morphing . I have to prewarp the images first , i have used imwarp function with the tform as follows , the code is , function []= ...
0
votes
0answers
94 views

font in MATLAB figures (type1 / type3)

I have some figures generated in MATLAB. I want to include the figures in a tex file. First I save the figure as eps format. and then I include the eps file in the latex. The default font of the ...
7
votes
1answer
115 views

Reverse graphics in pgfplots

Issue and Question I encountered that my graphics are all upside down. Now I have to mirror them in pgfplots. How can I perform this step? It is no solution using the option [y dir=reverse] which ...
2
votes
0answers
105 views

Greek-Letters-Different in AdobeReader and TexStudio, who's right?

I want to use greek letters in my Matlab Figures and then use the figures in Latex. I'm using TexStudio, and the preview inside of TexStudio shows me, for example if I entered a \mu in Matlab ...
1
vote
0answers
224 views

LaTeX TiKz Matlab - Marker Colors in Scatter Plots [closed]

I create a figure in Matlab, then export using matlab2tikz, then compile everything in a LaTeX document. The problem I have is tikz changes the color of the markers specified in Matlab. For instance ...
1
vote
0answers
180 views

Problems converting matlab figures to pdf using /psfragfig

I am trying to include MATLAB figures as pdf files in my thesis. However after reinstalling my OS this doesn't work anymore and I am desperately trying to find a solution... What I do: I use the ...
0
votes
1answer
150 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 ?
4
votes
2answers
154 views

How to include graphics?

I have some Matlab code that produces some diagrams. All I want to do, is to import these diagrams into TeXmaker. In which format do I have to save these diagrams and what packages do I need for this ...
1
vote
1answer
144 views

Remove whitespace in plot in Matlab textstring where 'DefaultTextInterpreter' is 'Latex'

With MWE: set(0,'DefaultTextInterpreter','Latex'); x = linspace(0,10,1e2); fx = sin(x); Xpos = 0.1; Ypos = 0.83; plot(x,fx); hTag = text(Xpos,Ypos,'(a)'); set(hTag,'FontSize',23); I get (too much) ...
2
votes
1answer
217 views

Disappearing Euro symbol in MATLAB EPS plots

I have a problem using eps images in LaTeX. Briefly, I have a plot from MATLAB were a label on an axis is "€". I insert this image in my tex file, then, when I compile, on the pdf the "€" disappear. ...
5
votes
1answer
340 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 ...
0
votes
1answer
424 views

label font size in matlab->matlab2tikz

Does anyone knoy how can we increase the labels fontsize when we use the matlab2tikz (see this link) function from the mathworks file exchange? I always have to access the *.tikz generated file and ...
0
votes
0answers
202 views

How to import SVG or EPS files with LaTeX legends on Inkscape?

I usually plot my functions using Matlab or Python (matplotlib) and set labels with LaTeX. Occasionally, the plots have some rendering problem and I edit their SVG or EPS files using Inkscape. The ...
2
votes
2answers
652 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 ...
1
vote
0answers
40 views

Matlab Laprint and jpg,pdf figures [duplicate]

For my thesis I would like to have the best quality and therefore I use laprint.m this generates an EPS and TeX file of my figures from Matlab (R2007b). The following is installed on my computer ...
1
vote
2answers
421 views

3D as 2D plots using Matlab data

I am trying to plot 3d data as 2d (please refer to the attached figure). Is that possible at all in Tex (or Matlab)?(Usually, this is done a s a legend, however, when no colors are allowed, I have to ...
1
vote
1answer
198 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
107 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 ...
1
vote
1answer
222 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
134 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 ...
2
votes
1answer
610 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 ...
5
votes
2answers
2k 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
347 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. % ...
5
votes
1answer
201 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
203 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 ...
14
votes
6answers
7k views

How to export matlab figures to (pdf) LaTeX?

I am writing a student thesis in LaTeX and need to import several figures created in Matlab. I found some programs to do this task: matfig2pgf matlab2tikz fig2texPS The problem is that using one ...
36
votes
10answers
17k 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?
28
votes
11answers
18k 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
132 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
1k 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
2k 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
506 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
714 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); ...
6
votes
1answer
694 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 ...
3
votes
3answers
928 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. ...