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

How to use \psfrag with Simulink?

I have tried to draw a block diagram in Simulink that has annotation fields. Then I have exported it in eps format from Matlab command window: print -deps -r300 -s resolver.eps The picture ...
2
votes
2answers
2k views

MATLAB output into tex [duplicate]

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, ...
1
vote
1answer
56 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
1answer
35 views

how can i draw a torus specifying axis and vectors on it?

i tried several ways drawing a torus in a special direction with my desired features on it but couldn't reach my goal. how can i draw a torus showing 3 axes and desired vectors and a theta on it?
0
votes
1answer
600 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 ...
2
votes
1answer
59 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
0answers
33 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
19 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
33 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
29 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
135 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
534 views
2
votes
0answers
104 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
49 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
43 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
24 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
55 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
299 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
38 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
54 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
62 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
56 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
51 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? ...
4
votes
0answers
249 views

eps import wrong title in graphic \pi looks like \neq

I need to import a figure from Matlab. I export it as an .eps. I use epstopdf to import it in LaTeX and for some unknown reasons the greek letter pi in the title of the plot that looks ok in the .eps ...
3
votes
2answers
713 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 ...
37
votes
12answers
41k views

How to avoid large margins around Matlab plot in PDF

I am preparing image files to be included in a latex document. The image file is generated by printing a Matlab plot. If I print the plot in eps format, the content of the eps file is fully occupied ...
1
vote
0answers
122 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
148 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
49 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
144 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, ...
1
vote
2answers
614 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 ...
0
votes
1answer
221 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
134 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
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?
0
votes
2answers
808 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 ...
5
votes
1answer
1k 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
167 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
249 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 ...
0
votes
1answer
271 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 ...
2
votes
1answer
421 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
114 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
162 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
1answer
229 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, ...
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 ...
3
votes
1answer
480 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
187 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 ...
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 ?