SimulationInput needs slx vs mdl file
Show older comments
When trying to run an .mdl file as follows, I received the following error.
>> in = Simulink.SimulationInput('myModel.mdl');
>> sim(in)
Invalid block diagram name supplied. Valid block diagram names are the same as valid MATLAB variable names. Type "help
isvarname" for more information.
This occurs eventhough myModel.mdl runs fine in the old Simulink syntax
>> sim('myModel.mdl')
I found that this error is pretty meaningless, and occurs even if the file does not exist. For example,
>> in = Simulink.SimulationInput('nonexistentModel.mdl');
>> sim(in)
returns the same Invalid block diagram error.
Accepted Answer
More Answers (0)
Categories
Find more on Simulink Environment Customization 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!