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
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.