How to Publish matlab outout and code in pdf.

643 Ansichten (letzte 30 Tage)
Muhammad Ramzan
Muhammad Ramzan am 8 Sep. 2018
Beantwortet: sujit am 26 Mär. 2024 um 2:32
Hello, How i can publish matlab output and code ".m file" into pdf format.
Thanks
  1 Kommentar
Pratyay Sengupta
Pratyay Sengupta am 2 Jun. 2021
I have a MATLAB code which generates a .txt file. Now I want to publish the code and the output text in a pdf format. Is it possible?
Currently I am able to publish only the code in the pdf format, but not the output text with it.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

madhan ravi
madhan ravi am 8 Sep. 2018
Bearbeitet: madhan ravi am 8 Sep. 2018
Try this :
publish('myfile.m','pdf')
Remark: The default file format is .html
Read the link below for better understanding:
  27 Kommentare
Muhammad Ramzan
Muhammad Ramzan am 8 Sep. 2018
Hello @ madhan ravi. Thanks for the help. can you please help
syms x
f =x.^2
fplot(f)
t = 1: 256
how i can ply. publish graph and not the output of
t = 1: 256
thanks
madhan ravi
madhan ravi am 8 Sep. 2018
t=1:256;
just suppress the output by putting semicolon(;)

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (4)

Alan Hernandez Ramirez
Alan Hernandez Ramirez am 4 Feb. 2020
bruh
dont use publish('myfile.m','pdf') if youre using the matlab online version
it crashed my computer opening so many figue pages hahahaha
  3 Kommentare
KARI WEISS
KARI WEISS am 15 Sep. 2020
same question

Melden Sie sich an, um zu kommentieren.


Walter Roberson
Walter Roberson am 8 Sep. 2018
"You specify the output format and location on the Publish settings pane. "

laurent jalabert
laurent jalabert am 4 Jun. 2020

sujit
sujit am 26 Mär. 2024 um 2:32
computing average marks of a student?

Kategorien

Mehr zu Environment and Settings finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by