Clear Filters
Clear Filters

Insert vector image ( or vector graphic ) in Simulink

6 views (last 30 days)
Does someone know if it is possible to insert a vector image (.pdf or .svg) in Simulink.
I have tried with .svg but simulink converts it to a very pixelated image.
Regards,
Enrique
  2 Comments
Daniel
Daniel on 28 Apr 2023
How are you trying to insert it? Are you just trying to paste it into Simulink for documentation purposes?
Based on my very, very perfunctory experience, it looks like Simulink converts svg's to pixellated images during the import, so the pixellation of the svg would probably (I'm guessing) depend on the pixel dimensions in the source rendering. I think you'll find the same behavior in other programs.
Enrique
Enrique on 28 Apr 2023
I do it by means of Create Annotation > Insert Image.
Maybe is a feature that is not enabled..., is quite interesting that Simulink allows to insert LaTeX equations (Create Annotation > Equation) which at the end are also vector graphics... But do not allow to insert a .pdf or .svg image without loosing resolution directly.

Sign in to comment.

Answers (1)

Piyush Dubey
Piyush Dubey on 2 May 2023
Hi,
Reproduction of the issue in the latest released version (R2022b) does not cause any pixelation of the images, there is a possibility that the source image dimension itself causes a lower resolution of the image.
Images can be directly copy pasted as well instead of creating an annotation. If the problem persists, the images can be converted to a .png or .jpeg format (is a very trivial workaround).
Function imread() can also be used to import images to the workspace. Then loaded to the Simulink canvas.
Documentation for them both is attached below:
Hope this helps!

Products


Release

R2019b

Community Treasure Hunt

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

Start Hunting!