{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
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 ...
3
votes
0answers
60 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 ...
4
votes
3answers
141 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 ...
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 ...
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 ...
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
93 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
223 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
179 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 ...
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 ...
2
votes
1answer
216 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. ...
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) ...
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 ...
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 ...
0
votes
1answer
421 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 ...
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 ...
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
106 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
339 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
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
133 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
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 ?
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
201 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
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, ...
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
505 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
712 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
693 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
608 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
924 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
80 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
326 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
293 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
53 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
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? ...
0
votes
1answer
292 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
336 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
124 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
265 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 ...
4
votes
1answer
656 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 ...