Matlab code on Raspberry Pi
Matlab offers embedded system support including most Raspberry Pi models.
A downside of this prototyping method is reliance on an opaque proprietary toolchain. If the prototype has a corner case Mathworks didn’t anticipate the project may have to be recoded in another language such as Python that runs directly on the embedded computer.
Another alternative is running the Matlab script directly on the embedded system using GNU Octave. We have achieved 30+ fps batch processing on video motion streams on the Raspberry Pi Zero with GNU Octave. Popular Raspberry Pi operating systems can easily install a recent GNU Octave.
apt install --no-install-recommends octave
First try Octave on a laptop to verify the particular Matlab script works with Octave. If the script doesn’t work with Octave and it seems too difficult to do so, consider transitioning to Python.