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

71 vues (au cours des 30 derniers jours)
Aniket
Aniket le 27 Fév 2013
Commenté : Bharath le 30 Août 2024
How do I save Simlulink model to JPG or any other image formats?

Réponse acceptée

Azzi Abdelmalek
Azzi Abdelmalek le 27 Fév 2013
Modifié(e) : Azzi Abdelmalek le 27 Fév 2013
Manually,
  1. Open your model
  2. click on edit
  3. copy model to clipboard
  4. in paint past your image
  3 commentaires
Trig
Trig le 9 Avr 2019
or just straight to jpg:
print(['-s',ModelName],'-djpeg',[ModelName,'.jpg'])
athraa sab
athraa sab le 6 Jan 2021
thanks for ur help

Connectez-vous pour commenter.

Plus de réponses (3)

Harish Balaga
Harish Balaga le 3 Juil 2013
Modifié(e) : Harish Balaga le 3 Juil 2013
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 commentaires
Jérôme
Jérôme le 13 Fév 2023
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 le 30 Août 2024
Correction in the code add a -before the resolution '-r300'

Connectez-vous pour commenter.


fathi jamila
fathi jamila le 19 Avr 2020
How can i read image SLC by matlab ?

Anil Chowdary Tummala
Anil Chowdary Tummala le 5 Fév 2021
You may use this to save simulink model as image with extension .tiff
print('-sModelName','-dtiff','model.tiff')

Catégories

En savoir plus sur Modeling dans Help Center et File Exchange

Tags

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by