Here is an example of taking a modified Arduino Uno-style board, like the Seeed Studio Grove Beginner Kit. We're using the Arduino IDE v1.8 and MATLAB 2019, along with the Arduino support package from the Mathworks. We use the Arduino IDE to verify that the hardware is working and to identify the software "port" that MATLAB needs to connect to the Arduino-compatible board.
Details about the hardware and alternatives here: https://drsmith.blog.yorku.ca/2020/10...