How to Publish matlab outout and code in pdf.

Hello, How i can publish matlab output and code ".m file" into pdf format.
Thanks

1 commentaire

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.

Connectez-vous pour commenter.

 Réponse acceptée

madhan ravi
madhan ravi le 8 Sep 2018
Modifié(e) : madhan ravi le 8 Sep 2018
Try this :
publish('myfile.m','pdf')
Remark: The default file format is .html
Read the link below for better understanding:

27 commentaires

madhan ravi
madhan ravi le 8 Sep 2018
@Muhammad did it work?
Muhammad Ramzan
Muhammad Ramzan le 8 Sep 2018
Modifié(e) : Walter Roberson le 9 Sep 2018
hello thanks for the reply. and my apology for late reply. this command is not working. https://www.youtube.com/watch?v=NN65DNIDjR0&t=320s
I want to publish code and output. like in this video. but i am not able to do this. I am only able to publish the code not the graphs.
Thanks
madhan ravi
madhan ravi le 8 Sep 2018
Modifié(e) : madhan ravi le 8 Sep 2018
It's working for me(even the graph), ok lets try this can you see an option as publish near editor.
madhan ravi
madhan ravi le 8 Sep 2018
let me know when you come to this step
publish button, but it is only publishing the code itself. i want to have graphs published with the code.
madhan ravi
madhan ravi le 8 Sep 2018
Modifié(e) : madhan ravi le 8 Sep 2018
click edit publishing button under publish button
the example given by you is working for me. but not in case of my file which i have to submit. :(
what is your email id
madhan ravi
madhan ravi le 8 Sep 2018
Modifié(e) : madhan ravi le 8 Sep 2018
Can you upload your file so that we can try and I'll convert it ?
i can email not upload here.
madhan ravi
madhan ravi le 8 Sep 2018
sure
hello , have you got email.
madhan ravi
madhan ravi le 8 Sep 2018
Modifié(e) : madhan ravi le 8 Sep 2018
check your mail @Muhammed ,if it is what you were looking for please accept my answer
madhan ravi
madhan ravi le 8 Sep 2018
did you check it?
yes, but it not working for me here.
Muhammad Ramzan
Muhammad Ramzan le 8 Sep 2018
Modifié(e) : Muhammad Ramzan le 8 Sep 2018
Please let me know. I was using the publish button. it was not working on my code. , only publishing code, not the graphs.
madhan ravi
madhan ravi le 8 Sep 2018
did you check it( above comment) now?
yes , but not working for me. what have you done.
I am doing the same steps. and can you please delete the file from here Please
madhan ravi
madhan ravi le 8 Sep 2018
madhan ravi
madhan ravi le 8 Sep 2018
madhan ravi
madhan ravi le 8 Sep 2018
yes this is working for me
thanks
I have voted.
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
t=1:256;
just suppress the output by putting semicolon(;)

Connectez-vous pour commenter.

Plus de réponses (4)

Alan Hernandez Ramirez
Alan Hernandez Ramirez le 4 Fév 2020

5 votes

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 commentaires

How do you publish then if you use the online version of matlab?
Scott Simmons
Scott Simmons le 4 Juin 2020
Same
KARI WEISS
KARI WEISS le 15 Sep 2020
same question

Connectez-vous pour commenter.

sujit
sujit le 26 Mar 2024

0 votes

computing average marks of a student?

Catégories

En savoir plus sur Data Import and Export dans Centre d'aide et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by