{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 ...
8
votes
3answers
199 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);
...
6
votes
1answer
116 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 ...
3
votes
3answers
144 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
45 views
Editing math.py for pygment
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, ...
1
vote
2answers
84 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
153 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
44 views
A question on consistency of fonts in figures and in text
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 ...
1
vote
0answers
174 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
102 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
201 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
66 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
133 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
...
0
votes
0answers
137 views
Not enough room in an internal buffer latex Tikz [closed]
I'm trying to plot a graph using TikZ (matlab2tikz output) but when I put it inside a subfloat latex doesn't produce any output file and complaines about being out of internal buffer. Any ideas how I ...
0
votes
0answers
25 views
MATLAB \ operator in equations [duplicate]
Is there a short-cut to putting \ into a LaTeX equation, with \ being the MATLAB linear system operator?
4
votes
1answer
193 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 ...
0
votes
1answer
106 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
80 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
419 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
208 views
Weaving MATLAB m-file into a LaTeX File
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 ...
3
votes
1answer
383 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
1answer
233 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
301 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
384 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
587 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
517 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
2answers
198 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
559 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:
1
vote
0answers
124 views
How can I customize a plot produced by matlab and exported by matlab2tikz script as I would do with subfigures and the \includegraphics command?
I.e: I had my plots arranged with a 3-in-a-row style with this code:
\begin{figure*}
\centering
\subfigure[Figure A]{\includegraphics[width=55mm]{a.jpg}}
\subfigure[Figure ...
4
votes
1answer
175 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
343 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
40 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 ...
11
votes
3answers
3k 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
97 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 ...
1
vote
0answers
105 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
170 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
363 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 ...
9
votes
2answers
2k views
inserting MATLAB code in the appendix
Does anybody have a quick and easy way to insert a large MATLAB code into the appendix? I looked up a few methods like mcode.sty but it doesn't seem to be active anymore. I have a ton of equations ...
3
votes
2answers
830 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
1k 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 ...
3
votes
1answer
355 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 ...
3
votes
3answers
2k 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
486 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
...
8
votes
2answers
1k 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 ...
3
votes
1answer
147 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
582 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 ...
7
votes
1answer
448 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
847 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
1k 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
773 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 ...
6
votes
2answers
848 views
Putting in MATLAB codes in a box as figures?
how do I put MATLAB codes in a box or deal with them as if they are figures? Is there a way to do it within LaTeX itself? I am currently using the verbatim environment to present my codes and to be ...
