{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

2
votes
0answers
28 views

Start Matlab code directly from Latex

I'm using the documentclass beamer to make a presentation. Is there a way to start Matlab code directly from Latex? A button that I can press so that the Matlab code starts to run automatically? ...
0
votes
0answers
30 views

Problem with import of eps plots from Matlab - leaving blank figures [on hold]

I am really frustrated with Matlab right now, as I have used many hours trying to find a solution to the problem with Matlab generated eps-plots leaving blank figures in Latex. This only occurs for ...
1
vote
0answers
19 views

conflict using matlab-prettifier and LaTeX beamer [duplicate]

I was trying to use the matlab-prettifier package with the LaTeX beamer package, and I noticed I was getting errors when trying to compile. Mainly I was getting an error when trying to use ...
1
vote
1answer
34 views

Matlab2tikz breaks major tick weight

matlab2tikz breaks my tick weights on both x-and-y axis. The figure in MATLAB looks like following. After running it through matlab2tikz with all possible known options of ExtraAxisOptions, I ...
1
vote
0answers
41 views

How do I import/link values from, e.g. MATLAB or a simple txt-file?

I'm writing a rather long report where I'm discussing results from a numerical calculation done via MATLAB. I would like to import the results into a tabular environment. The results are them selves ...
4
votes
1answer
42 views

Why does this syntactic element not get properly highlighted by matlab-prettifier?

I've found that the matlab-prettifier does not highlight all the syntax compared to the original file. For example, here is a snapshot of part of the file I am trying to include in my document from ...
1
vote
1answer
75 views

Difference in typesetting of given examples [closed]

Consider the following two examples, they produce same output Do they follow different typesettings? Only the first is producing a output in Matlab not second, can someone hint me, why? ...
1
vote
0answers
92 views

How to make a LaTeX table with MatLab? [closed]

I would like to know how to make a nice LaTeX table in MatLab, after I have calculated some numbers. The table should have this design: \begin{table}[] \centering \caption{My caption} ...
2
votes
1answer
81 views

Open a .tex file, modify it in MATLAB, and then save it in a .tex file again (+ possibly compile it) [closed]

[This question requires the knowledge of both tex and MATLAB, and probably this is not the write place to ask it, but maybe someone has experience of both these program and can come up with an idea] ...
0
votes
0answers
35 views

Problem with pstool creating a figure

I have a problem creating a figure with pstool on ubuntu. I want to process figure created with matlabfrag in pdflatex using pstool. Here is a MWE: \documentclass{article} \usepackage{pstool} ...
2
votes
1answer
118 views

how can I explain a MATLAB code in my document like picture?

I have a matlab code and I want explain part of them like picture. or any other idea can do better. \documentclass{article} \usepackage{listings} \usepackage{color} %red, green, blue, yellow, ...
0
votes
1answer
126 views

eps from Matlab .fig does not show axis and labels in Latex

I would like to make clear from the start that I don't have the matlab script that produced these .fig, so answers concerning Matlab configurations might not give an answer (although accepted as ...
2
votes
1answer
105 views

Remove 10-base x tick labels from matlab2tikz plot

I am trying to extract some plots from Matlab for XeLaTex using Matlab2Tikz. All goes well, except the plot with the loglog scale (I included a figure, see below). The left bottom plot shows a loglog ...
1
vote
2answers
367 views

Drawing spherical harmonic density plots on the surface of a sphere in tikz/pgfplots

I would like to create spherical harmonic plots in tikz/pgfplots similar to the one below, except without the axes and with labels above every image: It would be good if I could specify different ...
1
vote
0answers
25 views

What can I use to typeset a part of MATLAB code (m file) in my document? [duplicate]

I have a .m file and call .m file with ‎\lstinputlisting{****.m}. but I want LaTeX to show lines 13 to 25. How is it possible?
5
votes
1answer
221 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 ...
1
vote
0answers
123 views

psfragfig/matlabfrag figure with LyX [closed]

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 ...
2
votes
1answer
273 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
103 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} ...
1
vote
1answer
136 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
98 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
179 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
288 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
145 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
124 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
51 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
200 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
192 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
173 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
70 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
83 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
133 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
71 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
61 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
34 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
639 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
61 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
446 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
78 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
681 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
268 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
917 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
239 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
644 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
379 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
90 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 ...
2
votes
2answers
485 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 ...
9
votes
1answer
980 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. ...
7
votes
2answers
827 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 ...
3
votes
2answers
763 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} ...