In the subsystem mask help in Simulink, how to access pictures in the same folder as the model?

2 ビュー (過去 30 日間)
I am writing a mask help in html for a subsystem block. I can access the image by using:
<<C---Users--------mask_help--image.png>>
The thing is that I don't want to go into the mask and changing the address every time I change the computer. I would like to copy the model and the folder with the pictures and keep it running.
If I use:
<<--mask_help-image.png>>
it goes to the temp folder where the html is generated and I want the folder where the model is.
Quite simple but I have been trying without luck. I am using Windows.
Thanks!

採用された回答

Kaustubha Govind
Kaustubha Govind 2013 年 7 月 8 日
Is the 'mask_help/image.png' relative to the path when your Simulink library exists? If so, perhaps you can find the exact path by using something like "which mylibname" and pre-pend the full path? This is typically how it's done in custom libraries.
  3 件のコメント
Kaustubha Govind
Kaustubha Govind 2013 年 7 月 18 日
How about using fullfile(pwd, 'mask_help', 'image.png') if the current directory is always going to be the location of the model?
Dani Tormo
Dani Tormo 2013 年 7 月 19 日
That is what I was looking for!
Many thanks Kaustubha!

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

その他の回答 (0 件)

カテゴリ

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

製品

Community Treasure Hunt

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

Start Hunting!

Translated by