Error: Data 'regionDemand' (#28) is inferred as a variable size matrix, while its specified type is something else.

1 view (last 30 days)
Hi,
I have specified the regionDemand matrix size within my matlab function block editor in simulink (user-defined function):
regionDemand = zeros(1,clusterCount);
where the value of clusterCount is obtained as an input into the function.
However, simulation of the code generated the error: Data 'regionDemand' (#28) is inferred as a variable size matrix, while its specified type is something else.
May I know how do I go about solving this? This is my first time using Simulink and there are many things which I have never come across before. Thanks a lot for helping!

Answers (0)

Categories

Find more on Simulink 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!