How can I insert an image when publishing a document?

56 ビュー (過去 30 日間)
Ezz El-din Abdullah
Ezz El-din Abdullah 2017 年 8 月 22 日
コメント済み: Imola Fodor 2022 年 3 月 17 日
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.

回答 (3 件)

Jared Evans
Jared Evans 2020 年 3 月 10 日
Also make sure it's on a new line. Took me an hour to figure out my mistake
%
% <<yourFile.jpg>>
  2 件のコメント
Ammar Mohammed
Ammar Mohammed 2021 年 2 月 27 日
thanks, saved alot of time!
Imola Fodor
Imola Fodor 2022 年 3 月 17 日
hello, this should also work in the live editor? putting it in a code section?

サインインしてコメントする。


KL
KL 2017 年 8 月 22 日
編集済み: KL 2017 年 8 月 22 日
% <<yourFile.jpg>>
Make sure to save your image in the folder where your m-file is being published. More here .
  4 件のコメント
Ezz El-din Abdullah
Ezz El-din Abdullah 2017 年 8 月 22 日
R2016a
.jpg
KL
KL 2017 年 8 月 23 日
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
Jan 2017 年 8 月 22 日
This code inserts a generic image called FILENAME.PNG into your published output.
<<FILENAME.PNG>>

カテゴリ

Help Center および File ExchangeScripts についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by