Data 'just_red' is inferred as a variable size matrix, while its properties in the Model Explorer specify its size as inherited or fixed. Please check the 'Variable Size' check box and specify the upper bounds in the size field. Component:MATLAB Func
5 views (last 30 days)
Show older comments
I have a simulink model for image processing application, with raspberry pi camera input and sdl video display output, also from the raspberry support library. To each Video display port (R,G,B), I am giving 2-d array, whose size is [321 481] each,so it would internally concatenate and display the RGB image.
I face an error while building this model as below:
Data 'just_red' is inferred as a variable size matrix, while its properties in the Model Explorer specify its size as inherited or fixed. Please check the 'Variable Size' check box and specify the upper bounds in the size field.
Component:MATLAB Function | Category:Coder error
Simulink cannot determine sizes and/or types of the outputs for block 'MATLAB Function' due to errors in the block body, or limitations of the underlying analysis. The errors might be inaccurate. Fix the indicated errors, or explicitly specify sizes and/or types for all block outputs.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/169203/image.png)
the channels are as shown:
just_red = uint8(show(:,:,1));
just_green = uint8(show(:,:,2));
just_blue = uint8(show(:,:,3));
where show is the image i want to display.
Pleas let me know how I can define these components in the right way to make this work.
I have tried to specify the size[321 481] in the ports and data manager(Edit data) with unchecked variable size. please see below:
<<
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/169204/image.png)
>>
if i specify the arrays in ports and data manager as variable size, with [321 481] i get a different error :
The input signal at port 1 for "model_pi/SDL Video Display1/MATLAB System" is a variable-size signal. However, the 'isInputSizeLockedImpl' method of the underlying System object "codertarget.linux.blocks.SDLVideoDisplay" indicates that the input size is locked. The System object cannot accept a variable-size signal as its input.
Component:Simulink | Category:Block error
1 Comment
Nicola Blasuttigh
on 11 Sep 2020
Hi! I have the same problem but with another system (not RaspberryPI). Did you solve the problem?
Thanks.
Answers (0)
See Also
Categories
Find more on Run on Target Hardware in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!