Tagged Questions

{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

0
votes
0answers
21 views

sum the series in matlab [on hold]

I am trying to sum the following function in matlab but with the following code I got "Undefined 'symsum' for input arguments of type 'double'. Any idea? p=3; c=3; r=4; Syms v; Syms r; v=0; ...
0
votes
1answer
76 views

epstopdf error: /undefined in uageLevel:

I try to run: C:\Users\Oleg\Desktop>epstopdf.exe test5-reference.eps and I get just an a blank .pdf with the following: Error: /undefined in uageLevel: Operand stack: Execution stack: ...
3
votes
1answer
50 views

Why do minus signs vanishes in listings typeset with matlab-prettifier? [duplicate]

I am typesetting my MATLAB code with package matlab-prettifier. However, the - sign are gone. How can I get it back? MWE \documentclass[12pt]{article} % For MATLAB code ...
2
votes
1answer
72 views

axis alignment for 3D graph using matlab2tikz

I am trying to include multiple 3D figures (created in matlab) into a latex file. The original 3D figures in matlab look like this: In the .m file that creates these figures, I use ...
1
vote
1answer
75 views

How to avoid Greek letter symbols in lstlisting

I am using the lstlisting package, but I don't want it to show Greek letters by its symbol. For example: \begin{lstlisting} Parameter.delta_x = 0.002e-6; \end{lstlisting} I want that line ...
3
votes
2answers
226 views

Read integers from external data file to document programming code in LaTeX

I am attempting to document my MATLAB programming code in LaTeX. For this, I use the mcode package, which defines the MATLAB lstlisting environment. With the commands ...
1
vote
1answer
49 views

Turning off/on numbering when using mcode

I have an appendix with a full Matlab script, quoted verbatim, numbered and coloured as I want. However, I want to quote about 10 lines of it as a figure in the body of my report, and since I will ...
0
votes
1answer
60 views

How to force wrap MATLAB code

I'm including a MATLAB script as an appendix in a report I'm writing, I'm using mcode to import it, but some of the lines are longer than the width of my paper. In my master document I have: ...
7
votes
2answers
113 views

Adding styling to LaTeX produced by MATLAB

MATLAB has a function called publish which has the option to export a script and its output as LaTeX. It looks quite nice, although there are a few additional things that I would like to do to the ...
4
votes
1answer
117 views

What can I do if a listing is too wide to fit in my two-column document?

I am writing a IEEE document with a LaTeX template I downloaded from the IEEE webpage. I inserted some MATLAB code into the document through the mcode package. It looks something like this: ...
10
votes
2answers
270 views

How can I hide (or blur) some code in a listing?

I have a code listing to write in a report, but I'd like to blur or hide some code parts with a colored box (of same length as the hidden text), so that readers cannot see the hidden parts. (Another ...
2
votes
2answers
214 views

doing 3x3 subplots with the colorbar located northside

I wanted to have my nine (2d) matlab plots shown as 3x3 subplots in latex with the colorbar located northside. I have no idea how to do this especially that I have the colorbar saved separately from ...
2
votes
0answers
128 views

using sublime 3 to install matlab-prettifier package from ctan library [closed]

How do I use Sublime Text 3's built in package manager to install packages from ctan? I am trying to install and use matlab-prettifier in a latex document class report. I manually downloaded, compiled ...
0
votes
0answers
97 views

matlab2tikz not maintaining subplot dimensions

The following Matlab script gives me the two plots of the time series object T204 a1=subplot(3,1,[1,2]) plot(T204) a2=subplot(3,1,3) plot(T204) It looks like this in Matlab: Then I use ...
7
votes
2answers
302 views

Plot and imagesc (from Matlab) with PSTricks

I'd like to plot with PSTricks some data from Matlab. I usually plot these data using the imagesc and the colorbar in Matlab, but I'd rather do it in LaTeX... Here is the picture I want to plot in ...
0
votes
1answer
176 views

Best practices for using MATLAB images in LaTeX?

I am writing a paper currently using PDFTEX, and I make heavy use of MATLAB figures. The problem is that when I make a MATLAB figure, I can adjust it to any size, before saving it. When I save it, I ...
2
votes
1answer
346 views

Problem with xticks when importing Matlab figures using matlab2tikz

When importing the following figure using the Matlab2Tikz, I obtain the following output , with the xticks strangely exported . Does any one have an idea how I can prevent this? Maybe by passing ...
1
vote
1answer
115 views

Matlab2Tikz Error with userdefined matlab colors

I try to include from matlab exported (matlab2tikz) tikz files into latex, but get error messages if i don't use matlab default colors. I don't get the problem?! Thanks you guys in advance Error: ...
2
votes
1answer
188 views

MATLAB Plot Alignment in latex

I have two plots in which the x-axis are the same and I'd like to have the y-axis positions to be aligned. As the numbering of the y-axes are different when I print them in MATLAB as two eps files, ...
2
votes
1answer
140 views

How to programmatically coax pgfplots to recognize nan within surface as matlab does

I came across this post after wondering why nan's did not appear to be handled by pgfplots as they are by matlab when working with the matlab pcolor function. My typical workflow in this context is: ...
3
votes
2answers
133 views

Listings problem with quotes in a string

A single quote occuring inside a listings string seems to be interpreted as ending the string. Is there a way to avoid this from happening? \documentclass[12pt]{article} \usepackage[top=0.3in, ...
2
votes
1answer
123 views

Plotting .dat file

I'm looking to plot a simple plot with data I've taken from MATLAB in a .dat file format. The file has two columns in the order shown below. I would like column 1 to be x and column 2 to be y. I've ...
1
vote
0answers
194 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 ...
4
votes
0answers
106 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
259 views

How to get listings 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 ...
4
votes
2answers
155 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 ...
2
votes
1answer
753 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
26 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
250 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
1answer
193 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
249 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
192 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
317 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
450 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
215 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
349 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
200 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
204 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
309 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
701 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
353 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
42 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
518 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
247 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
147 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
599 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
395 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
176 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
184 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 ...