{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
0answers
16 views

Matlab hotkey shortcuts [on hold]

How to define matlab hotkeys for specific task. Specifically, I usually need to use the "copy figure" with high frequency when using figures. How can I assign a shortcut (hotkey) for it.
0
votes
1answer
37 views

Plot problem with tikz and data from matlab

I extracted data from matlab figures, with the command "dlmwrite('heat.txt',[x',u],'delimiter', '\t')". It gives me a text file with 3 columns of numbers (the first is the abscisse x, and the other ...
0
votes
0answers
20 views

Psfragfig generating duplicate figure without text

I am writing my project report and I want all my figures to have same font size and type as Main tex file even on resizing the figure. I am using gnuplot epslatex terminal to output my figure(foo.tex +...
0
votes
0answers
26 views

Wrong font in EPS files

I'm not totally sure if this is a Tex, Matlab or PDF problem... I create some plots in Matlab with 'Times New Roman Italic' as font (i.e. set(gca, 'FontName', 'Times New Roman')). The output of ...
2
votes
1answer
32 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
154 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
45 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{...
0
votes
0answers
37 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
65 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
0answers
56 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
14 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
46 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
50 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 ...
1
vote
1answer
55 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
94 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
84 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
35 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
42 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
38 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
193 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
548 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
145 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
62 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
48 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
25 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
69 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
629 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
43 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
87 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
74 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
71 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
57 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
79 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[{\...
1
vote
0answers
144 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
198 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
55 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
158 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,...
0
votes
1answer
281 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
166 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
707 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
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
187 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
490 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
124 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
190 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 ...