I created a subsystem with a mask to enter the name of a mat file (figure below).
In my subsystem, i have a matlab function (figure below)
The code in the matlab function is as follows:
function y = fcn(fname,u)
The simulation files are attached.
I used the string constant to pass the file name to the matlab function, but it not working.
I want my subsystem to be protected, so the user can't access the matlab function. The user can only provides the mat file name.
The main question is how to pass a mat file to matlab function block throw a mask. The real model is more complicated, this is just a simple demonstration.
Thank you, Amjad