Skip to main content

Questions tagged [matlab]

{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 algebra) based storage and calculations.

Filter by
Sorted by
Tagged with
0 votes
0 answers
35 views

Get Tikz/pgfplot figure (quiver+contour) as seen in MATLAB

I have a rather involved MATLAB script that plots the gradient field vectors to be exactly the lengths between the contours of a surface. I want to be able to have this graph natively drawn in LaTeX. ...
David G.'s user avatar
  • 205
0 votes
1 answer
46 views

problem with the trasposition symbol '

I'm new to latex and I should do an assignment with some matlab code. I wrote the latex file but when I make it into pdf there's a problem with the symbol ' which is the symbol of trasposition in ...
federica's user avatar
0 votes
1 answer
58 views

Matlab2tikz and alignment: i need help

I made matlab2tikz convert two matlab graps into .tex files, the first image generated the following code: \definecolor{mycolor1}{rgb}{0.00000,0.44700,0.74100}% \definecolor{mycolor2}{rgb}{0.85000,0....
Davide's user avatar
  • 129
1 vote
0 answers
59 views

Wrapping inserted code from MATLAB

I am attempting to insert a very long code that I wrote in MATLAB into my thesis document written on Overleaf. Several of the lines have long equations or comments that extend beyond the page and I ...
Jah's user avatar
  • 11
0 votes
0 answers
53 views

SVG font rendered offset

I'm generating figures in MATLAB (MWE below), loading them into LaTeX (Overleaf), and then making them very small. Is there something I can/should be doing to control the text anchoring such that the ...
Danny Garside's user avatar
1 vote
0 answers
74 views

Dotted line changes to solid line when matlab fig save as .eps

I have some matlab figures which I would like to put in a table in LaTeX (as shown in figure). The issue is, when I try to save my matlab figures as .eps and then try to insert in LaTeX, the dotted ...
iman fathema's user avatar
0 votes
0 answers
65 views

Pdf picture altered when included in a LaTeX document

I have a weird problem. I am using pdf files for pictures in my LaTeX document. Sometimes directly exported from Matlab, sometimes with a bit of post-treatment in PowerPoint (it's convenient for me ...
Romain Liechti's user avatar
-2 votes
1 answer
172 views

Changing variables in a Latex file using Matlab

I'm trying to import an excel sheet to Matlab, then I use the data to change variables using Matlab then I generate a new tex file as below (found the code online).Everythig is working except for the ...
Diana's user avatar
  • 1,285
0 votes
0 answers
705 views

How can I use text and latex simultaneously in matlab legend?

I am trying to set my legend in a Matlab picture as $K_{\text{C}}$, which can be built with pdflatex as this: When I practice in the Matlab, I use the following code figure plot(1:10,10:10:100,'ro-')...
HiBlank's user avatar
1 vote
2 answers
185 views

listings does not ignore comment character inside a string

I'm trying to insert a matlab code file in my tex document using listings but the output is messy because I'm using % inside a string with fprintf which is also a comment character. In the line ...
Midouj's user avatar
  • 21
1 vote
2 answers
195 views

Include MATLAB code listing compiled into HTML with correct colors

I am compiling a LaTeX file my_document.tex into an HTML page my_document.html using htlatex with the following command: htlatex my_document.tex "xhtml,mathml-" " -cmozhtf" I have ...
Paul Wintz's user avatar
1 vote
1 answer
414 views

MATLAB-typeset command within LaTeX paragraph

I would like to know if there is a way to include a MATLAB command within a sentence in LaTeX such that the command is in the MATLAB typeset format. I have seen examples using the matlab_prettifier ...
JDS's user avatar
  • 13
0 votes
0 answers
106 views

Systematic way to export cropped surface plot as png from Matlab and put into pgfplots axis

I know that Matlab related questions are not popular on the site but I am sure it can be helpful to a lot of people. Suppose that one have really large plot generated in Matlab. Lets talk about ...
struct's user avatar
  • 801
1 vote
0 answers
18 views

Include matlab .m file for donwload [duplicate]

I was just wondering if there was a way for including a matlab.m file in latex, so you would be able to click a hyperlink in the pdf and then get a .m file ready for use. I know you can import the .m ...
mriisa's user avatar
  • 540
0 votes
0 answers
2k views

How to install a package with the new Miktex console

I am trying to install the mcode package to add MATLAB code in my LaTeX documents but with the new console, I do not know how do install it. The pop up window that is supposed to show when a package ...
daniel's user avatar
  • 1
0 votes
0 answers
69 views

Matlab to Latex data exceed memory limit error

Sometimes I feel its easier to use Matlab to draw figures, but I save them to data files and then plot them in Latex to have the same font styles, colors, etc. But I'm facing couple of problems like ...
Diana's user avatar
  • 1,285
0 votes
1 answer
1k views

How can I add a matlab code (namefile.mlx) to my overleaf project?

I've exported my matlab code (a file in .mlx format) by using the option "Save" -> "export to LaTex" and I've obtained two files, one in .tex format and the other one in .sty ...
g_don's user avatar
  • 789
1 vote
1 answer
607 views

Matlab Code in a Thesis

I'd like to insert matlab code just by copying and pasting the code I want, I'd like it in black, no colours, if it's possible I'd like in a text box with the number of lines, but not necessary if it ...
Noob_Latex's user avatar
1 vote
0 answers
105 views

Eps file weirdly compiled

I have an overleaf project with a number of .eps files. I use the graphicx package to include them in the final .pdf. Most of the files compile properly, but two of them, which have labels on them (...
Marko's user avatar
  • 11
1 vote
1 answer
327 views

Numbers not shown with matlab-prettifier and beamer

I'm trying to add MATLAB code to a beamer presentation, but using matlab-prettifier package numbering isn't showing. Does anybody knows why this is happening? I'm not even sure that using matlab-...
IvanB's user avatar
  • 111
1 vote
1 answer
314 views

Use listing for Matlab code from another file directory

I used the listingcode example from here What can I use to typeset MATLAB code in my document? to load a matlab code file directly into LaTeX, but I use different file directories as followed: \...
Riboswitch's user avatar
0 votes
1 answer
763 views

Producing table from MATLAB command window output and exporting to Overleaf Latex

Is there any way to produce a table from this MATLAB output in command window and exporting to Overleaf Latex?
Rhombus's user avatar
  • 167
1 vote
4 answers
264 views

How to draw the figure using pgf-tikz plot or Matlab?

I want to draw the following figure using pgf-Tikz package or Matlab code (anyone): Here I have given some names to the semi-circles and nothing else. You can put any arbitrary names. But I need to ...
learner's user avatar
  • 663
0 votes
0 answers
239 views

How to convert give you Matlab figures in Latex a cleaner look

I am trying to import my Matlab graphs into LaTex. I already know how to do it. However, the graphs have poor quality and are unproportioned. How do you get those Mablab figures to appear "HD&...
Missael's user avatar
  • 185
1 vote
1 answer
165 views

How can I add string formatting for listings code?

How do I make sure that string-like code like "file" below (on line 7) gets same formating (purple/muave) like strings below? \documentclass{article} \usepackage{verbatim} % code \...
Clone's user avatar
  • 543
1 vote
1 answer
4k views

two column document figure over entire page

I have a document with two columns, I want to insert a figure that is as wide as the entire page (not only in one column). my figure is a matlab graphic in .eps format. I use \usepackage{multicol} {2} ...
GCMeccariello's user avatar
1 vote
0 answers
218 views

Removing scientific notation of y-axis

Hello fellows and folks! 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 ...
jdoubleu's user avatar
2 votes
0 answers
394 views

MATLAB to LaTeX eps file glitches and problems

My question is about including MATLAB exported images in LaTeX. I need it to be a vector graphic image. I have spent a lot of time trying to search for an answer. It is with great hesitation that I am ...
eigenaus's user avatar
1 vote
1 answer
327 views

Bar Chart - Change Face Color Separately For Every Single Bar

I am using Matlab's bar command to create a bar-chart. I am using matlab2tikz to convert it. I would like to change the face color of every single bar separately to an rgb color of my choice. In ...
Timon's user avatar
  • 127
0 votes
0 answers
259 views

Update Matlab graphics in Overleaf

I was told that it is possible to link a Matlab script with an Overleaf account such that output of any form (figures, tables and data) can be updated and imported everytime a Matlab script is ran. ...
user avatar
0 votes
1 answer
398 views

Putting purple color to MATLAB font and code structure [duplicate]

I have this MATLAB code: After sysms the variables turn purple and I cannot make that in the MATLAB script I have in Latex: \documentclass{article} \usepackage[T1]{fontenc} \usepackage{bigfoot} % ...
Julio Ortegón's user avatar
1 vote
0 answers
34 views

Matlab's script losing identation when pdf is generated. How can i solve it?

i am new in all this Latex stuff, but i am trying to learn. Currently i am stuck in a problem: display a Matlab code. This is my code in TexStudio: \documentclass[12pt]{article} \usepackage[margin =...
Guillherme's user avatar
1 vote
1 answer
55 views

Problem with Chapterbib and Matlab-prettifier

I am trying to insert a Maltab code in a Latex document using Matlab-Prettifier. I am configuring the package as indicated below: \usepackage[framed]{matlab-prettifier} \lstset{ style ...
Fabio Barbosa's user avatar
0 votes
0 answers
26 views

Listings weird charater behaviour

I am trying to put in MATLAB code with comments that contain my language charaters thought they are covered under ANSI chars they jump to word begining in comments. Heres the code. Its basically ...
healLV's user avatar
  • 1
0 votes
0 answers
220 views

3D Polar Plot in sperical coordinate system in PGF/Tikz - Matlab2tikz fails, me too. (CST MWS Antenna FarField pattern)

I have simulated an Antenna in CST and want to plot the 3D pattern. The resolution is fairly low with a step size of 20°. Matlab2tikz won't help because it creates huge PDFs (60kB tex file to 5MB ...
Homosapiens's user avatar
1 vote
2 answers
2k views

I want to add only one line of Matlab code in latex

I wan to show which command line I have used for some specific result. for example i want to show this line 'for i=1:100' in between text. I am using listing environement. \documentclass[hidelinks, ...
Mannie's user avatar
  • 106
0 votes
0 answers
94 views

Add a matlab script(m.file) into Latex: error with text-overflow ( edit 2)

I am trying to add an appendix with Matlab scripts in my thesis. I have used the post about it here. In my main.tex I have added: \usepackage[T1]{fontenc} \usepackage{bigfoot} % to allow verbatim in ...
Noel Miller's user avatar
1 vote
1 answer
100 views

MATLAB code in Overleaf compiles as Greek instead of English

I'm writing a document using Overleaf. The main language I'm using is Greek. The Greek shows up fine but when I try to enter Matlab code using the package listings, it shows up as Greek in the ...
Zero Pancakes's user avatar
0 votes
1 answer
894 views

Latex cant read from my .dat file

I wrote a .dat file from Matlab. this data has 8 columns each having 1x101 values. \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{pgfplots,tikz,graphicx} \title{ Experimental ...
Farouk Yahaya's user avatar
1 vote
1 answer
96 views

How to make the list of listings to work properly in tex4ebook?

How to make the list of listings to work properly in tex4ebook? Commands \tableofcontents and \listoffigureswork correctly. The pdf result The epub result I didn't found any suggestion to ...
FHZ's user avatar
  • 3,949
1 vote
1 answer
560 views

Using matlab prettifier to put 100 lines of code per page

I need to put my code for a software I have written in my thesis appendix. There's about 4000 lines of code across multiple files, so I'd like to have 100 lines of code per page. Using these settings,...
Corinne's user avatar
  • 13
0 votes
1 answer
2k views

Formatting Matlab file with lstlisting

I included a Matlab file, and it worked fine. The colors changed and it looked nice. Suddenly Latex doesn't change the colors of the code, except of the background color. Is something wrong with my ...
bearniva's user avatar
0 votes
0 answers
225 views

Latex does not compile eps files form Matlab? [duplicate]

I have problem with inputing eps files from Matlab in my latex document. Matlab version is R2016a. Windows version is 10, editor is Texmaker 5.0.3, MikTeX is version 2.9. The first case is when I ...
iviviviviv's user avatar
0 votes
0 answers
62 views

Highlighten specific x-axis values

I need some help to plot a small figure for my thesis. I know that the question is towards Matlab, but I export the figure as a tikzpicture and genuinely think that you guys deliver the better ...
aladin's user avatar
  • 115
1 vote
0 answers
6k views

MATLAB Font in LaTeX [closed]

I want to write a single command from MATLAB in LaTeX using the MatLab font. I have found a lot of examples using listing, but that is for the whole code. I only want to change the font for one word, ...
mriisa's user avatar
  • 540
0 votes
0 answers
25 views

error while using diacritical marks in matlab code in latex [duplicate]

I'm very new to latex and I'm trying to write a latex document in polish. It contains diacritical marks such as "ą" or "ś" and it all works fine until I try to add some Matlab code to the document. My ...
user avatar
0 votes
0 answers
131 views

Extract EPS file data for PGF plot

For our project this semester we have to make a scientific paper and poster. To keep the poster nice and uniform we are using PGFplots for our graphs. One problem though is that MATLAB Simulink can't ...
mriisa's user avatar
  • 540
0 votes
1 answer
451 views

Matlab histogram converted to Latex makes blurry image

I´am trying to import a matlab histogram to latex. So I generated the plot and saved it with print -depsc MyPicture. Afterwards I loaded the .eps File with \includegraphics[width=.8\textwidth, ...
Playergod's user avatar
1 vote
1 answer
3k views

Text in image scaled to same size as body text

I am working on a research submission and my supervisor requires that any text on my graphs (e.g. axis labels, tick marks etc) are the same size as text in the main body of my report (including ...
wgb22's user avatar
  • 125
1 vote
1 answer
100 views

Have listing package recognize Matlab comments coming after "..."

In Matlab, ... means that a statement is continued on the next physical line. Any text coming after the ... is a comment. Is there any way to have the listing package recognize the comments coming ...
user36800's user avatar
  • 875

1
2 3 4 5
7