'Failed to compute constant value for nontunable property 'Width'. In code generation, nontunable properties can only be assigned constant values.'.
10 次查看(过去 30 天)
显示 更早的评论
I have a simulink model for an image processing application. I have an android camera, a simulink function block(that contains the m code for the application) and an android display. Since the display accepts R,G,B uint8 matrices, I have decomposed my image matrix to to these three channels,used datatype conversion uint8 on each of the 3 channel and fed them to the android display. I get the following error while compiling:
Simulink detected an error
'Failed to compute constant value for nontunable property 'Width'. In code generation, nontunable properties can only be assigned constant values.'To prevent this error, use one of the following:
* Modify the System object to avoid code that does not support code generation.
* Implement propagation methods in the System object code.
I know the size of the R,G,B matrices I am outputting and I have specified the same in 'Edit data'. Please help me understand what am I doing wrong here.
attached an image of the model. Thanks.
1 个评论
Cam Salzberger
2017-10-23
Hello Anuja,
Are you able to deploy the Getting Started with Android example model to your device? If so, then it is likely something in your "model3" block that is allowing the size of the images to change, which isn't allowed for code generation.
Can you take a look to ensure that constant sizes are enforced throughout that model?
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Modeling 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!