问题
Is it possible to do a system call from Simulink? I haven't found it in documentation, but maybe there is a workaround. Or, it can be as easy as an function call.
回答1:
You should be able to use an Embedded MATLAB Function Block to run a MATLAB function from Simulink. Within this function you can make a call to the SYSTEM function to execute an operating system command.
回答2:
Yes, I do believe this is possible through S-Functions. Unfortunately, you must drop down to C or C++ and deal with a very clunky interface to the model. It's been a very long time since I've done work with an S-Function, so I'm afraid I can't help much beyond pointing out their existence.
来源:https://stackoverflow.com/questions/4875981/system-call-from-simulink-possible