Simulink Image From File parametrization

4 views (last 30 days)
Giuela
Giuela on 30 Nov 2020
In my Simulink model I have a Image From File block to load an image to process and I've created a mask to choose the image file to load.
I want to change the FileName field of the block with the file name chosen, but it seems that the FileName field can be changed only opening the block and writing the name by hand, If I try to change with the command:
set_param('myModel/ImageFromFile','FileName','pippo.jpg')
or
set_param('myModel/ImageFromFile','FileName',fileName)
I get the error:
Error in 'myModel/ImageFromFile': Failed to evaluate mask initialization commands.
Caused by:
One or more output arguments not assigned during call to "varargout".
It seems that the block field is read-only
Can anybody suggest me what to do?
Thanks

Answers (0)

Community Treasure Hunt

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

Start Hunting!