{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
1answer
46 views

matlab2tikz, label on right side of colorbar

How to move the label right of the colorbar? Now it is in the plot itself. This is the matlab-code.... clear all close all clc figure surf(peaks(2)) cb = colorbar cb.Label.String = 'Label' ...
1
vote
1answer
46 views

LaTeX symbol for single quote mark that MATLAB will recognize

I'm writing MATLAB code in LaTeX and I would like to be able to cut and paste it directly into the MATLAB command window. One critical symbol is the ' (single quote). When processed by LaTeX it shows ...
1
vote
0answers
32 views

Annotations Moved…Where does the fault lie? [closed]

I will walk you through what I have done: I created a figure in Matlab: hfig=figure('Units','inches','Position',[0 0 4 3.5],'PaperPositionMode','auto') To remove access white space around it, I ...
1
vote
0answers
17 views

Is matlabfrag(.) still a viable option for latex?

matlabfrag(.) is part almost all answers to the questions that are posed regarding including matlab figures in latex document. All I want to know is that is it really part of the solution? I have ...
1
vote
0answers
30 views

Latex typesetting lost in matlab figure

I searched over google but couldn't find a fix to my issue. Following is the summary of what I am doing I generated figure in Matlab(R2015b) Used matlabfrag(.) to save the .eps and .tex version of ...
0
votes
0answers
22 views

matlab-prettifier with fancyvrb-style of label / frame

I wonder how to make the frame line around caption of listing not being printed (top line being broken into two by caption in the middle) when matlab-prettifier (or listings package) are being used, ...
2
votes
0answers
21 views

What is the best way to include Matlab figures in Latex [duplicate]

I know that this question is not new but as I look at the answers, like, What is the best way to include Matlab graphics? matlab figures with latex fonts I realize that these threads are old. Since ...
3
votes
2answers
103 views

matlab2tikz spectrogram is too big

I have produced the following spectrogram in MATLAB and I am trying to import it into a LaTeX document after using matlab2tikz. I am fully aware of the issues with maximum memory etc for typesetting, ...
4
votes
3answers
521 views

Really big MATLAB equation to be put into LaTeX [closed]

I have a very big equation in MATLAB ...
2
votes
0answers
89 views

Smooth Contour Plots in PGFPlots

I am trying to use gnuplot within pgfplots to draw contour plots for a data file. The contour curves are unfortunately not smooth enough, and the additional limitation is the size of the data file (a ...
0
votes
0answers
42 views

How to include Matlab plot in LaTeX document so that font sizes matches?

I'm writing a report in LaTeX. I'm using scrbook with 12pt and a4paper. I have created a lot of plots in Matlab which I would like to include in my report. I have scaled the plots to my full display ...
4
votes
1answer
40 views

tex4ht problem with matlab-prettifier package. lstlisting code shows differently from lstinputlisting

It seems like a lost case using Matlab code in Latex when it comes to tex4ht. I switched to using matlab-prettifier package instead of mcode package to load Matlab code in Latex since I found too ...
1
vote
0answers
23 views

mcode package with tex4ht and lualatex produce invalid HTML for strings in Matlab code

This is a new question following the one tex4ht-scrambles-some-matlab-code-when-using-mcode-package This one fails when Matlab code used has strings in it. tex4ht removes the single quote around the ...
1
vote
1answer
54 views

How do I remove white space at the top of my inserted matlab code?

I've Solved This Question: use \vspace{-1cm} I'm using this package: \usepackage[autolinebreaks]{mcode} I want to put a subtitle for my Matlab code and then have it follow on immediately after ...
1
vote
1answer
167 views

How to get “MATLAB” symbol in Latex?

Looking for something similar to \LaTeX. It is correct in this section from my textbook.
1
vote
0answers
34 views

Position of text on graph using matlab2tikz (underflow issue)

The matlab pcakage matlab2tikz converts plots automatically to Tikz files, which can be later called in the main Tex document very easily. Here's my problem: the piece of tikz below draws a circle ...
2
votes
0answers
43 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? ...
1
vote
0answers
21 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
51 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
51 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
49 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
76 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
113 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
134 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
45 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
136 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
200 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
127 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
538 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
956 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
146 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
380 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
110 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
158 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
215 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, ...
3
votes
1answer
427 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
177 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
137 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 ...
2
votes
1answer
236 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
231 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
200 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
168 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
75 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
36 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
700 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 ...