{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

1
vote
1answer
2k views

Translating Matlab figures into TikZ

When ever I want to write a research paper and print the simulated results (by Matlab) into an .eps file, I think of a direct way of translating Matlab fig files into LaTeX (especially TikZ). Is ...
3
votes
1answer
2k views

Replacing axis labels with text in Tikz

I am plotting 11 points in a scatter plot in Matlab and replacing the x-axis labels 1 - 11 with strings using: figure; grid on; hold on; box on; scatter(2:10,100*d1(1,:),'rs','filled'); ...
3
votes
1answer
707 views

Undefined control sequence \text when importing Matlab figures

I'm following a tutorial to import Matlab figures through tikz, however after trying to compile the .tex file I get the following error: ABD: EveryShipout initializing macros (./mysphere.tikz ! ...
8
votes
3answers
864 views

draw Fourier Series Expansion with tikz/pgfplots

This is a MATLAB code T=0.3; A=0.3; t=0:0.01:4*T; n1=length(t); N=100; s=0; signal=0; for i=1:n1 s=0; for n=1:N s=s+A*4/(pi*(2*n-1))*sin(2*pi*(2*n-1)/T*t(i)); end signal(i)=s; end plot(t,signal); ...
7
votes
1answer
980 views

.eps file generated by matlab not centered correctly

Everything is all right before I updated all my MiKTeX package to latest version. But after that, I find that all .eps file generated by Matlab cannot be shown correctly. For example. I use Matlab to ...
2
votes
1answer
844 views

psfragfig pdflatex image shifted and cropped

Some images inserted with psfragfig, are shifted to one side (right) and partially placed off the document. (see image, bottom figure is the one I'm talking about). It occurs with TexShop whether I ...
3
votes
3answers
1k views

Insert text inside a image in eps format

UPDATE:I tried the solution with overpic and it works fine. But the problem is, sometimes, my experimental setup changes and I have to reproduce the eps file using different parameters from Matlab. ...
2
votes
0answers
88 views

Editing math.py for pygment [closed]

I'm using the minted package to syntax my code. When I'm doing so in I'm using the Matlab language. When to continue on the next line, we do so in Matlab by entering ... before the next row. However, ...
2
votes
2answers
422 views

Problems with mdframed

I am trying to put a box around matlab code but the bottom of the box sits extremely close to the next line. I try a line break but it does not work. Any ideas? \documentclass[a4paper,12pt]{article} ...
2
votes
1answer
338 views

Intersecting planes not shown correctly with TikZ

I made a plot in MATLAB of a deformed and an undeformed model. I converted the figure to TikZ using matlab2tikz and added it to my .tex file. I then noticed that the two configurations, which are ...
0
votes
0answers
54 views

A question on consistency of fonts in figures and in text [duplicate]

Suppose I output a figure of some function from Matlab, without adding the x-axis label and y-axis label. The figure is then saved as a PDF file. Now I want to input this figure into LaTeX, and I ...
7
votes
1answer
9k views

How can I insert latex symbols into a matlab plot?

I have a figure in matlab with axes that I would like to label with latex symbols like $\delta$ on the x axis and $\epsilon$ on the y axis. How can I place these latex notations into the axis labels? ...
0
votes
1answer
367 views

Plotting from MATLAB with matfig2pgf: some plots do not show up in the pdf

I am ploting from Matlab with matfig2pgf. I plot two lines put only part of them show up in the .pdf, once it's compiled: dat1= [-500:1000, rand(1501,1}] dat2= [-500:1000, cos(rand(1501,1})] ...
2
votes
1answer
396 views

Trouble including a Matlab surf plot (pdf or png) with pgfplots

I have successfully used \addplot graphics before. Now I have a surf plot in Matlab, which I exported as png and pdf and I would like to include the image with \addplot3 graphics. I found some ...
2
votes
0answers
129 views

Turn preamble font declaration into a “oneliner” to be used in Matlab

I was already using x and y, and needed something similar, but different so I declared the following in my preamble: \DeclareFontFamily{OT1}{pzc}{} \DeclareFontShape{OT1}{pzc}{m}{it}{<-> s * ...
1
vote
2answers
329 views

Figure is chopped off when inserting a MATLAB table as eps figure

I am trying to include a MATLAB UI table (which I have previously saved as an .eps figure and put it into the same folder as my .tex file) into a LaTeX document, using: \begin{figure} \centering ...
5
votes
1answer
790 views

Including package to create MATLAB labels using LaTeX

When using LaTeX as the interpreter to typeset labels in MATLAB it would be great to be able to include packages to customize appearance. Is this possible? As of now I know no method to create non ...
1
vote
1answer
277 views

Bug? Colored frame in mcode package

While using mcode.sty, I recognized that at linebreaks with long comments parts of the surrounding frame got colored green or were even left white at using mathematical formulas, e.g. in the following ...
4
votes
1answer
104 views

pdflatex of individual PDF images already containing pdfmark information

I'm using pdflatex to generate a document from hundreds of single-page PDF images. (The images are originally in Postscript but I use Ghostscript to convert them to PDF prior to running pdflatex). ...
6
votes
1answer
2k views

Setting math font size

MATLAB has the ability to "publish" code as an html document. It can include math by taking equations keyed in LaTeX notation, processing it with latex and embedding a bitmap image into the html. An ...
2
votes
0answers
234 views

Weaving MATLAB m-file into a LaTeX File [duplicate]

Hopefully this is a simple question: is there a simple, fast, and general method of porting the the text of an m-file verbatim into LaTeX and have it appear as it does in VI, i.e. ignore all of the ...
5
votes
1answer
2k views

Export eps figures modified by psfrag

I am not an expert on figure exports and, although I have been searching around quite a lot, I can't find the answer to my problem. During the writing of a journal article, I had the idea of using ...
2
votes
2answers
785 views

Bad font using \psfrag

I'm trying to include a figure that I made in MATLAB. I want to change the font using \psfrag, however there seems to be a problem when scaling the figure down. It keeps the font the same size as the ...
8
votes
0answers
314 views

Help on adjusting histogram plot created by TikZ [duplicate]

I am trying to create a tikzpicture similar to what I have made in MATLAB. MATLAB gives me the following result after running histogram: myhistnorm = [ 0.1231 0 0 0 0 0 0 0.0001 0.0001 ...
3
votes
3answers
1k views

Changing fraction style in LaTeX as generated by Matlab

A= [0.7577 0.7060 0.8235 0.4387 0.4898 0.7431 0.0318 0.6948 0.3816 0.4456 0.3922 0.2769 0.3171 0.7655 0.6463 0.6555 0.0462 0.9502 0.7952 ...
3
votes
2answers
3k views

Including a Matlab table in document

Using Matlab I got a table. Now I want to integrate in a LaTeX document. I assume it works like including an image in a document. A = [1 2 3; 4 5 6; 7 8 9]; latex_table = latex(sym(A)) latex_table = ...
2
votes
1answer
1k views

matlab2tikz for surf plots: reducing data?

I was really happy to see that matlab2tikz also supports surf plots. Unfortunately, it produces too much data, so I run into the well-known memory problem. I tried compiling with lualatex instead of ...
6
votes
1answer
584 views

change code font using mcode package

I'm using mcode package to insert into my document matlab code. I would change the default font. what command I should use to get this font?
2
votes
1answer
2k views

How to get Matlab code into a LaTeX document?

I'm trying to put in my thesis matlab code but the results are not very good. I would get something like that but I don't know what packages using and how to create this result:
4
votes
1answer
272 views

matlab2tikz and bar3 function

If I use the function hist3() it perfectly works with matlab2tikz. But if I use the function bar3 I find this in my matrix.tikz: % This file was created by matlab2tikz v0.2.3. % Copyright (c) ...
2
votes
1answer
967 views

Minor ticks not showing when using matlab2tikz

I am using matlab2tikz to import MATLAB figures into TeX. However I can't seem to get the x or y minor ticks to show in the document compiled by TeX. The MATLAB figure I have converted to .tikz have ...
2
votes
0answers
42 views

Aligning comments that break in several lines? [duplicate]

Possible Duplicate: How to align comments with lstlistings? I want to include Matlab code with long comments. The next MWE shows that it is achieved by using the listings package. However I ...
14
votes
3answers
9k views

matlab figures with latex fonts

I realize this question might have been asked already, but I'm relatively new to LaTeX and matlab so I need some help. I'm trying to export a figure for inclusion in my tex document (to be compiled ...
1
vote
1answer
168 views

pgfplots externalize and references: some work, some don't

I have started using the tikz externalization library for my current project. From here I learned to use \pgfplotsset{invoke before crossref tikzpicture={\tikzexternaldisable},invoke after crossref ...
3
votes
0answers
123 views

Figures (pdf) do not contain any text in the final document [closed]

I am creating some plots in Matlab and saving them as pdf files. When I include these pdf files in latex (i am using MikTex and pdflatex) using \includegraphics, all text from plots (legends, xlabel, ...
5
votes
0answers
250 views

Plots from externalized TikZ are rotated [closed]

I just found out about tikzexternalize and I love it - well, almost. This is my situation: I have done simulations in Matlab and used matlab2tikz to get the plots from Matlab into my .tex document. ...
5
votes
2answers
634 views

Getting rid of \vspace{1em} from MATLAB LaTeX publish

When publishing an m-file from MATLAB to LaTeX, a vertical space of 1em is inserted after each text paragraph. I frequently input these published files directly into a master document by using the ...
30
votes
3answers
17k views

What can I use to typeset MATLAB code in my document?

This question led to a new package: matlab-prettifier Does anybody have a quick and easy way to typeset some relatively long MATLAB code in the appendix? I looked up a few methods, and the ...
5
votes
3answers
2k views

Removing scientific notation in tikzpicture made by matlab2tikz

I am having a very hard time trying to figure out how to remove the scientific notations on the y-axis of my graphs. The graphs are made in MATLAB and then converted into TikZ files using the package ...
5
votes
1answer
3k views

Inline MATLAB code

I want to write MATLAB code in a sentence. I installed package mcode, no problem if I want to display the code by inserting the code in environment \begin{verbatim} and \end{verbatim}. How could I ...
4
votes
1answer
572 views

Inserting an image into a figure using psfrag

I'm trying to import figures from Matlab into a LaTeX document using PSFrag. For some of the figures I'd like to be able to add little images in particular places. I thought I'd be able to just add ...
4
votes
3answers
5k views

pstool, pdfLaTeX: Not getting pstool to work, “LaTeX Error: File not found”

I've spent lots of hours trying to solve a problem by myself. Unfortunately it seems that no one else has experienced the same problem. At least, searching through various forums and employing Google ...
2
votes
3answers
1k views

Problems with including a tikz tex file generated by Octave (MatLab clone)

I have plotted a figure in Octave and printed it as a TikZ figure (see the device option) to a tex file called comparison_tikz.tex, and I have imported it into my document with the line ...
9
votes
2answers
3k views

matlab2tikz - TeX out of memory

I am using matlab2tikz to import figures from MATLAB to tex. However I quickly get the message TeX capacity exceeded, sorry [main memory size = 3000000]. I have tried expand main memory using ...
4
votes
1answer
178 views

Splitting .tex file across pages when included as figure

I am trying to include a .tex file in my thesis. The file is some MATLAB code formatted to appear correctly in LaTeX. The compiler throws a warning that the code is too long for the page, but it ...
2
votes
1answer
883 views

Editing matlab tikz figure

Matlab gave me this code for graph. I want to remove values from axes and add only my own values, which are \pi and \sqrt{2}. How to edit this code? \begin{tikzpicture} \begin{axis}[% scale only ...
8
votes
1answer
859 views

pgfplots: color a surf using arbitrary colors

I am trying to figure out if there is an equivalent in pgfplots to what in MATLAB is done through the following command: surf(A,B). This would plot the geometry A, using the colors specified in B. I ...
1
vote
0answers
1k views

Can't plot a surf from MATLAB using pgfplots [closed]

for whatever reason I cannot come up with I am not able to plot a surf figure I have generated in MATLAB and then converted to tikz using the script available here. I am getting the following errors: ...
5
votes
2answers
2k views

Breaking lines in codes with mcode package

I want to include some code from MATLAB and I'm using the mcode package. But the problem I encounter with it is that it doesn't break long lines automatically and since I load the file and not the ...
0
votes
1answer
2k views

MuPAD (MATLAB symbolic toolbox) export to LaTeX

Is it possible to export a entire MuPAD notebook into LaTeX in the same fashion like Mathematica does? I am familiar with MuPAD latex command but it seems (at least on the first glance) that it is ...