How do I save Simlulink model to JPG or any other image formats?

 採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 2 月 27 日
編集済み: Azzi Abdelmalek 2013 年 2 月 27 日

7 投票

Manually,
  1. Open your model
  2. click on edit
  3. copy model to clipboard
  4. in paint past your image

3 件のコメント

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 2 月 27 日
Or by line command
model % model is your model name
print('-smodel','-dbitmap','new_name')
im = imread('new_name.bmp')
% You can then save it as a jpg file
imwrite(im,'filename.jpg')
Trig
Trig 2019 年 4 月 9 日
or just straight to jpg:
print(['-s',ModelName],'-djpeg',[ModelName,'.jpg'])
athraa sab
athraa sab 2021 年 1 月 6 日
thanks for ur help

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

その他の回答 (3 件)

Harish Balaga
Harish Balaga 2013 年 7 月 3 日
編集済み: Harish Balaga 2013 年 7 月 3 日

1 投票

as Azzi Abdelmalek said above, print command can be used. And one can directly save it in required fomat in single command. (no need to use imead, imwite commands). Example: use
ModelName % to open the model
print('-sModelName','-dtiff','model.tiff')
to save ModelName.mdl in TIFF format. Image name will be model.tiff
replace -dtiff with -djpeg for saving the model in jpeg format

3 件のコメント

Nicolas Fernandes
Nicolas Fernandes 2018 年 11 月 20 日
I've tried using this command to save in EPS format, but didn't work. Is there a way to increase the figure resolution?
Jérôme
Jérôme 2023 年 2 月 13 日
You can select the resolution with the resolution parameter:
print('-sModelName', '-dpng', 'model.png', 'r0') % Screen resolution, same as without parameter
print('-sModelName', '-dpng', 'model.png', 'r300') % Resolution of 300 dots per inch
Instead of 300, you can put what you want.
Bharath
Bharath 2024 年 8 月 30 日
Correction in the code add a -before the resolution '-r300'

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

fathi jamila
fathi jamila 2020 年 4 月 19 日

0 投票

How can i read image SLC by matlab ?
Anil Chowdary Tummala
Anil Chowdary Tummala 2021 年 2 月 5 日

0 投票

You may use this to save simulink model as image with extension .tiff
print('-sModelName','-dtiff','model.tiff')

カテゴリ

ヘルプ センター および File ExchangeModeling についてさらに検索

製品

タグ

質問済み:

2013 年 2 月 27 日

コメント済み:

2024 年 8 月 30 日

Community Treasure Hunt

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

Start Hunting!

Translated by