-
Run the MATLAB container using this command:
docker run -it -p 5901:5901 -p 6080:6080 --shm-size=512M mathworks/matlab:r20XYz -vnc
-
:r20XYz chooses the release version of the MATLAB container. E.g.:
r2022a
-
Open a bash for the Matlab container: e.g.:
docker exec -it <containerID> bash
. -
Run Matlab with
root
permissions:sudo matlab
. -
Install Industrial Control Communication Toolbox as add-on:
-
Install Matlab Simulink as add-on:
-
Install gcc, g++, foltran:
-
docker ps
docker commit <containerID> <repository>:<tag>
- E.g.:
docker commit 3d555451f07a mymatlab:r2020a
.
- E.g.:
-
- Open docker-compose file
cd ~/ICSVirtual/network/ICSNetwork
. - Change the image of the
matlab
service bysflorenz05/matlab_simulink:v0.3
.
- It has been created a Dockerfile that ADD the source code into the container base image:
sflorenz05/matlab_simulink:v0.3
. - In this way, the image
sflorenz05/matlab_simulink:v0.4
has been built.
-
The
*.c
version of all of the following folders must be compiled using mex: -
All files has been compiled by default.
- E.g.: If we go inside the
ASU Unit
folder (see the PATH in the following image) we only need to compile the*.c
, using the commandmex ASU_UNIT.c
. Important:*.mexa64
files are generated.
- E.g.: If we go inside the