Colorbar not supported in Simulink "MATLAB function" surf plot
4 次查看(过去 30 天)
显示 更早的评论
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?
0 个评论
采纳的回答
Ameer Hamza
2020-6-4
编辑:Ameer Hamza
2020-6-4
Add this line
coder.extrinsic('colorbar')
in the MATLAB function block before the colorbar line.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 General Applications 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!