Colorbar not supported in Simulink "MATLAB function" surf plot

1 Ansicht (letzte 30 Tage)
I have a custom surf plot written into a "MATLAB function" in simulink environment and I add the 'colorbar' in the plot to see the color division.
However I get the following error, related to the "colorbar" command:
Function 'colorbar' not supported for code generation.
Function 'Beam/MATLAB Function' (#46.1201.1209), line 36, column 60:
"colorbar"
Launch diagnostic report.
Component:MATLAB Function | Category:Coder error
How can I add a colobar to my simulink MATLAB function without get such error?

Akzeptierte Antwort

Ameer Hamza
Ameer Hamza am 4 Jun. 2020
Bearbeitet: Ameer Hamza am 4 Jun. 2020
Add this line
coder.extrinsic('colorbar')
in the MATLAB function block before the colorbar line.

Weitere Antworten (0)

Kategorien

Mehr zu General Applications finden Sie in Help Center und File Exchange

Produkte


Version

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by