Hi, Im trying to generate the C code for my matlab code using Matlab Coder. I got a lot of errors and one of them is Function 'imshow' not supported for code generation.
7 views (last 30 days)
Walter Roberson on 6 Dec 2022
You do not fix it. Or you fix it by telling matlab Coder that imshow is an external function and then provide your own imshow that does something
The goal of MATLAB Coder is to generate C or C++ compliant code that does not reply on any operating system or target system functionality not included in the C or C++ standards. Those standards do not include any graphics facility.
Some of the Simulink targets that can be selected support some graphics. Those graphics are handled by the relevant Support Package including graphics blocks that are target specific. For example you can send images to an LCD display on a raspberry pi, but it is rather clumsy. The matlab side does not provide access to those blocks.
In summary: you should only expect matlab Coder to support computation and some specific device interfaces, and you should not expect it to support graphics.