MATLAB: How to run Simulink executable on Raspberry Pi

raspberry pisimulink

I created a Simulink model and deployed it successfully on a Raspberry Pi. The model can be run from MATLAB terminal using
% code
h=raspberrypi;
h.runModel('modelName');
I want to run the model directly from the Pi without using MATLAB. I tried to find the executable at /home/pi/Simulink_model_name_rtt/MW/Simulink_model_name but the subfolder MW does not exist (there is a folder named modelName_ert_rtw created at /home/pi). I used MATLAB2016a and Raspberry Pi 3 hardware.
Thanks a lot!

Best Answer

Use the following command on your Raspberry Pi terminal:
sudo ./modelName.elf
See this link for details.
Related Question