필터 지우기
필터 지우기

where to save the mask images?

조회 수: 6 (최근 30일)
Ahmed Badie
Ahmed Badie 2015년 5월 12일
답변: Ben Rancici 2017년 2월 3일
I'm trying to mask some blocks, using images only, which works well in the beginnings. while whenever I restart the program the images just disappear and 3 question marks ? ? ? replace them. where to save the mask images such that it can be permanent in the program?

답변 (2개)

Sebastian Castro
Sebastian Castro 2015년 5월 12일
The images need to be on your MATLAB path to be picked up by the model.
One of the simplest things you can start with would be to make sure the images are on the same folder as your model, so that when you navigate to that folder to open the model, the image is also on your MATLAB search path.
Another approach is to create an "images" folder and make sure that the folder to the path when the model is opened, and potentially removed from the path when the model is closed. You can do this by issuing the addpath / rmpath functions in a Model Callback, or by creating a Simulink project.
- Sebastian
  댓글 수: 1
Ahmed Badie
Ahmed Badie 2015년 5월 14일
thanks for your help. but again both solutions works some times and don't work some other, I don't know why?!

댓글을 달려면 로그인하십시오.


Ben Rancici
Ben Rancici 2017년 2월 3일
I made the same observations as you, and the solution I found is just to run the simulation. Right after compiling, "???" are replaced by the images.

카테고리

Help CenterFile Exchange에서 Author Block Masks에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by