{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
33 views

plotting 3d bars in Latex [closed]

What is the best way to include 3D matlab plots in Latex ? I didn't get good results inlcluding bar3 plots from Matlab.
0
votes
0answers
52 views

Matlab figure background color inside tcolorbox [closed]

I am using the following code for placing a figure inside a tcolorbox. .... \tcbset{breakable,enhanced,colback=gray!3,colframe=orange,fonttitle=\bfseries} .... ...
5
votes
1answer
47 views

How to include Matlab code into LaTeX in colour? [duplicate]

I need Matlab code, e.g. the one here, in LaTeX and in colour (the comment is green, for/if/else/end is blue). % super cooles Programm i = 1 for i = 1:10 if i > 3 i=i+2 else ...
0
votes
0answers
35 views

Unwanted Edges in MATLAB Pcolor Figure Appear in TeX [closed]

I want to use an eps file in my tex document. I generate this figure with MATLAB using pcolor command. To make the edges smoother and omit the grids, I use the shading flat (or shading interp) ...
1
vote
0answers
46 views

psfragfig/matlabfrag figure with LyX [on hold]

I want to include some psfrag-figures in PDF output with LyX 2.1.3, e.g. ex02.eps & ex02.tex compiled from Matlabfrag's ex02.m, but it does not work. It worked with LyX 1.5.6, see Matlabfrag ...
0
votes
0answers
37 views

Matlab2tikz axis bug

I am using Matlab2tikz with following test code: frames = [8, 16, 32, 64, 128]; mult = [1300 7300 17000 42000 88000]; add = [1400 7300 19000 45000 93000]; figure plot((frames),(mult), 'rd-', ...
1
vote
1answer
100 views

PNG or PDF (or EPS)

Is there a preferred format between PNG, PDF, or EPS for use with pdflatex, particularly in terms of compile speed? If I understand, pdflatex must convert each PNG/EPS file to a PDF file with each ...
1
vote
0answers
63 views

How to put TikZ file from Matlab to Latex? [closed]

I made TikZ file in Matlab using function matlab2tikz so I want to put that figure in my Latex document. I am using this code: \documentclass{article} \usepackage{tikz} \usepackage{graphicx} ...
0
votes
0answers
56 views

How to center matlab .eps figure in LaTeX document? [closed]

I created .eps file from matlab figure using the export setup option in the matlab figure File menu, and then pressing the export button in the opened dialog box. In Latex document I added the next ...
1
vote
1answer
91 views

Change font in Matlab-prettifier using WinEdt QuickGuide template

this question builds from questions answered by Ignasi and Paul Gessler. I would like to know how I can go about changing the font in the Matlab-prettifier environment using this WinEdt QuickGuide ...
1
vote
0answers
97 views

Tilde symbol inside an environment [duplicate]

I have set a new matcode environment in order to have some matlab code in my .tex file, using the matlab-prettifier package (combined with the listings package). However, I have a problem with the ...
1
vote
1answer
116 views

get matlab-prettifier to work in pdflatex

in the min example below, I cannot get the file to compile as it complains that I must change my typesetting engine to xelatex or lualatex instead of plain latex or pdflatex. In my original program, ...
2
votes
1answer
56 views

matlab-prettifier code not showing correctly

In the MWE below, the text (fonts and colors) from the Matlab Code read from \lstinputlisting do not show up like that from the Matlab generated from the lstlisting code: \documentclass{book} ...
2
votes
1answer
92 views

matlab-prettifier only shows up black text

This is my preamble for my book documentclass: \documentclass[11pt,fleqn]{book} % Default font size and left-justified equations ...
1
vote
1answer
76 views

Define starting line number when using mcode.sty to display Matlab code and referring to the code

I want to include parts of my Matlab code in my LaTeX document using mcode.sty. Here's a MWE: \documentclass[b5paper, 10pt, twoside, openright, dvipsnames,cmyk]{report} \usepackage{listings} % Is ...
0
votes
0answers
49 views

reduction of figure quality , after PDF to LATEX [duplicate]

I am plotting figures in Matlab to then use them in Latex. I am using the following code to change the size of the display while I am using the save2pdf function ...
2
votes
1answer
94 views

matlab2tikz scales width variable by factor 0.95092

I use global default variables \figwidth for figure width and \figheight for height in my document. These are defined by the following code in my document header: Latex ...
1
vote
1answer
117 views

Exporting stacked bars using matlab2tikz in MATLAB working strangely

I have created a stacked bars in matlab as shown in the figure. In matlab figure window it looks like this: I use the following command to get this plot. plotBarStackGroups(rand(5,3,3), [1:3]) ...
1
vote
1answer
117 views

Error compiling code matlab in latex [closed]

good morning, someone help me? MWE: \documentclass[preview]{standalone} \usepackage[latin1]{inputenc} \usepackage[spanish]{babel} \usepackage{latexsym,amsmath,amssymb,amsfonts} ...
1
vote
0answers
66 views

How to add function names to listings package [duplicate]

I have some MATLAB code in my tex file, which I am highlighting with the listings package. However, there are some functions, such as "vision.CascadeObjectDetector", "imcomplement", "bwboundaries", ...
0
votes
0answers
80 views

Matlab plots not visible in Latex when saved as jpg [duplicate]

I have to put my plots of MATLAB works in LATEX but my problem is that they are not so clear , is there a way to overcome this problem ?
1
vote
0answers
85 views

Why ps2pdf changes colors of my .eps file?

I'm currently using Matlab R2012a + Inkscape 0.48 + Texlive 2014 + Texmaker 4.4.2 (W7 64) to produce my scientific documents... Basically I create figures in Matlab, export them in .eps, edit them in ...
0
votes
1answer
58 views

Figure imported from Matlab to Latex [duplicate]

I have a problem getting a figure from Matlab into Latex. I have saved the figure as a EPS-file in the same folder as I have saved the latex-documents. This is what I wrote in Latex: \begin{figure} ...
0
votes
0answers
58 views

Matlab 2d/3d figures into LaTeX [duplicate]

I'm writing a paper in LaTeX and want to include some figures from Matlab. I have 2d plots and 3d surfaces to include. Are there any guides to academic writing / published papers which show best ...
4
votes
0answers
32 views

how to support the special latex characters in Matlab plot title [duplicate]

I'm trying to type \digamma. In latex, this character is supported in \usepackage{amssymb}. In Matlab, I can set the interpreter to be Latex as follows Figure1=figure(1) ...
3
votes
2answers
434 views

Use Matlab 2014b figures (via Inkscape) in pdfTeX

I know there are many threads related to this topic, but I still could not find a satisfying solution. Summary Matlab 2014b figures -> export as .eps or .svg -> load into Inkscape (problem is in ...
2
votes
0answers
53 views

Misaligned text strings in pgfplots with view option set [closed]

Please see this post for more background. The problem is that tick mark labels explicitly specified by code of the form: text(x(k),y(k),labs{k},'horizontalalignment',horizk,... ...
2
votes
1answer
239 views

Make visible node text outside of pgfplot axes range

I'm using matlab2tikz in order to generate pgfplots .tex code to create a figure with pdflatex. The matlab function I'm using to create the figure creates each of it's tickmark labels explicitly, so ...
1
vote
0answers
77 views

plotting matlab trisurf and trimesh in latex [duplicate]

I am trying to plot some data in latex. In Matlab the plots are generated by using the function trisurf and trimesh. What is the best way to generate or to import these plots into a latex document ...
5
votes
1answer
399 views

Is there a way to draw a Voronoi diagram with pgfplots?

I want to draw a voronoi diagram with pgfplots, but sadly I cannot get it the way it should look like. I used the Matlab command to get the x and y coordinates and saved them as a dat-file. In that ...
0
votes
0answers
177 views

Fail to convert .eps format file to pdf in a text

I use the following code to export a figure from matlab in .eps format(MATLAB code): my_figure = figure plot(x,y) print(my_figure,'-depsc','Figure.eps') Later I use this code to create a figure in ...
2
votes
1answer
210 views

MATLAB output into tex

Is there any way to import raw MATLAB output into .tex documents? I have already seen verbatim package as a solution, but it does not meet my demands for 2 reasons: Matrix elements are not aligned, ...
0
votes
1answer
175 views

File-encoding issues with \lstinputlisting

Matlab save .m file with ANSI encoding. I have a sample .m file, and want import it into LaTeX with UTF-8 encoding. How to convert ANSI file encoding to UTF-8 and input it, without changing the ...
3
votes
1answer
513 views

I want to take a CSV file, process the data, and generate a report file, where can I go to learn how to do this?

I have access to MATLAB for data processing, and TeXstudio for the report. I am familiar with MATLAB about 100x more than LaTeX. The data flow I am trying to create: CSV file is generated with 50 ...
6
votes
1answer
170 views

What is the difference between \usepackage{mcode} and \usepackage{listings} for MATLAB codes?

I know there is available in the MATLAB Central File Exchange site the mcode.sty package, which allows to put MATLAB codes into TeX files. ...
1
vote
0answers
84 views

auto-pst-pdf not working [closed]

I have used laprint within matlab to generate a simple graph: set(0, 'defaulttextinterpreter','none') figure(1), clf plot([1 2]) ylabel('A straight line') laprint which gives me line.eps and line ...
0
votes
0answers
36 views

matlab2tikz not capturing subplot borders

When I change the subplot x-axis limits in Matlab and then use matlab2tikz, the subplot border is deleted as shown in the following figure: I have to generate many figures, so is there a way to do ...
2
votes
2answers
368 views

Root locus plots using LaTeX

On my homework, I need to create a root locus plot. Wondering if anyone out there has good suggestions for a package that is able to create root locus plots, or a general plotting package that is ...
8
votes
1answer
593 views

How can I typeset Julia code with the listings package?

I'd like to typeset some Julia code, syntax highlighting and all, with the listings package. For information, the Julia language is a strong contender for MATLAB, and is free and open-source. ...
6
votes
2answers
532 views

How to draw 3d vector field on a line?

How to draw 3d vector field on a line? I want to visualize the vector field $( m_x(x), m_y(x), m_z(x) )$. After searching "visualize vector field", I find that most plotting software either plotting ...
2
votes
2answers
436 views

Choosing lines from a Matlab file using matlab-prettifier

I have been using the matlab-prettifier package a couple of times. So far I have only imported the entire .m-file to be shown in my documents using: \usepackage[numbered,framed]{matlab-prettifier} ...
3
votes
1answer
162 views

Problem with plotting 3d plot in Latex, I have a sample Matlab plot

I have a Matlab plot shown below which I want to replicate in Latex. The data for Matlab is: i_whole=[ 0 0 0 0 0 3.7000 3.8000 3.8000 4.2000 3.7000 ...
2
votes
2answers
863 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
117 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
203 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
191 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 ...
4
votes
2answers
420 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
125 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
205 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
350 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 ...