How to pass value to params of masked subsystem from m files and restore the output from simulink operation each time?
Show older comments
Hi everyone, I have one problem if the subsystem is masked, then the workspace for all variables masked within the subsystem is different from the matlabe base workspace. Here is problem which I met. (1). the values of variables [x] for masked susystem are defined in matlab base workspace, (2).the run the "sim" for simulink, (3). return the {output(from the output port); x} to workspace for further operation (4). the main code computes and give new [x'] for next operation of the simulink. (5). repeat the same process of step (1). this is a little different from single call sim. The second iteration stuck after (5), which means the transfer of variables fail.
Could you give me some suggestion and help? Again many thanks.
Accepted Answer
More Answers (0)
Categories
Find more on Subsystems in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!