{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
30 views

Matrix array overflow

I have an extremely large matrices and I can't show it in portrait or landscape size of a page. so is there any way to show the matrix with its array like command pretty do in Matlab.
4
votes
1answer
149 views

Converting Matlab arrays to LaTeX compatible Code

I was looking for ways to convert some MATLAB 2D arrays directly to LaTeX executable code that prints it nicely. While searching I came across this answer Including a Matlab table in document The ...
2
votes
1answer
29 views

Multiline Matlab comments in package Listings

I am using the package listings to include some Matlab code in my report. It works well with comments beginning by % but does not recognise multiline comments %{ ... %}: \usepackage{listings} \lstset{...
12
votes
3answers
6k 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 ...
-1
votes
0answers
18 views

am having problem managing the margin around the code please help

[![ 1: http://i.stack.imgur.com/ZRFeY.png I am trying to publish matlab code but it's overlapping code in the next column. I tried to do it using tabular format but still no help. if there is any ...
1
vote
1answer
74 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 ...
0
votes
0answers
28 views

Dynamically setting the fontsize with matlab2tikz

I'm using matlab2tikz to create a tikz file out of my Matlab plot. I'm using the following code: cleanfigure; matlab2tikz('test.tikz', 'height', '\figureheight', 'width', '\figurewidth', 'showInfo', ...
3
votes
1answer
45 views

Problem with ticks and caption when importing Matlab figures using matlab2tikz

I have created a nice plot in Matlab and converted it into tikz with the matlab2tikz library. It works great but there are two problems: The ticks of the axis are not good. Especially for the y-axis ...
0
votes
1answer
612 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 ...
0
votes
0answers
52 views

Is there any way to reduce the EPS images' file size, by removing the not visible parts?

I've just wondered, that is it possible to reduce the EPS images' file size by removing/ merging(I don't know how to call this process) the not visible parts of the images, that is covered with other ...
0
votes
0answers
11 views

Latex Symbol Scaling in MATLAB publish

After looking through the already answered questions I found a little gem that scales the TEXT itself but not the actual LaTeX symbols. Could someone point me in the right direction? I'd much rather ...
2
votes
0answers
37 views

MATLAB generated Tikz not working

When trying to use a .tikz file generated from a MATLAB script, the .tex file errors and is not able to build. The .tex code is as follows: \documentclass{article} \usepackage{amsmath} \...
0
votes
1answer
44 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
44 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?
2
votes
1answer
75 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
34 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
40 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
35 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
171 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
539 views

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

I have a very big equation in MATLAB f1=((y_o2_ca_in*M_o2/(y_o2_ca_in*M_o2+(1-y_o2_ca_in)*M_n2))*(((k_sm_out*(x5-((x1*R_o2+x3*R_n2+x8*R_v)*t_st/v_ca)))+((M_v/M_a)*phi_des*(((10^(-1.69*10^-10*t_cl^4+3....
2
votes
0answers
129 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
56 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
45 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
64 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
482 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
41 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
69 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 matlab-...
1
vote
1answer
70 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
63 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
55 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
78 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.\left[{\...
4
votes
0answers
252 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
727 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 here:...
37
votes
12answers
42k 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
137 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} \label{my-...
2
votes
1answer
177 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
51 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} \begin{...
2
votes
1answer
152 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, cyan,...
1
vote
2answers
658 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
255 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
154 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
855 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
2k 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
178 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 ...