How can I insert an image when publishing a document?
Mostrar comentarios más antiguos
I would like to publish a MATLAB code into an html and pdf files and I want to insert an image from my computer into the code i.e. NOT a figure from MATLAB.
Respuestas (3)
Jared Evans
el 10 de Mzo. de 2020
1 voto
Also make sure it's on a new line. Took me an hour to figure out my mistake
%
% <<yourFile.jpg>>
2 comentarios
Ammar Mohammed
el 27 de Feb. de 2021
thanks, saved alot of time!
Imola Fodor
el 17 de Mzo. de 2022
hello, this should also work in the live editor? putting it in a code section?
% <<yourFile.jpg>>
4 comentarios
Ezz El-din Abdullah
el 22 de Ag. de 2017
KL
el 22 de Ag. de 2017
Which version of Matlab are you using and what's the extension of your image file?
Ezz El-din Abdullah
el 22 de Ag. de 2017
KL
el 23 de Ag. de 2017
I tried it on R2015a as well, it works with a jpg file. Probably you're not putting it under a separate section..
<<image1.jpg>>
<<image2.jpg>>
<<image3.jpg>>
and all these images should be in the publishing folder.
Jan
el 22 de Ag. de 2017
This code inserts a generic image called FILENAME.PNG into your published output.
<<FILENAME.PNG>>
Categorías
Más información sobre Scripts en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!