Search code examples
perlmatlabubuntusimulink

How to pass input arguments and record outputs from Simulink Standalone executable which runs on Ubuntu


I am trying to execute the standalone executable which is generated by building my Simulink model in Ubuntu terminal as follows:

!./my_model

I want to pass input arguments to this executable, which is present in form of .mat files as of now. There are 9 input ports which takes series of values and model has 10 output ports for which I need to log the output for each of the input combinations for testing the model.

I have used grt.tlc for building and code generation which is for generic real-time target.

Please let me know, how to pass the inputs to this executable and record the output on ubuntu terminal. The aim is to run this model in outside matlab environment.

Thank you much.


Solution

  • You really want to be using the RSIM target, not the GRT target. The command line (i.e. Ubuntu terminal) options for running the model with different parameter files can be found by searching the doc, and clicking on the Rapid Simulation link, returned by the following MATLAB command,

     >> docsearch('Scripts for Batch and Monte Carlo Simulations')