Not have enough information to determine output sizes
76 views (last 30 days)
Simulink does not have enough information to determine output sizes for
this block. If you think the errors below are inaccurate, try specifying
types for the block inputs and/or sizes for the block outputs.
I have an Input Parameter with two Information 1x2 Matrix using only the second Information in this example, but it does not work.
My Simulink realisation with Threashold (Switch1 = 80) and InitialCondition (Memory2 = 50):
The MATLAB Function contains:
function y = fcn(u)
y_ = 50;
y = y_ + u(2,1) - 20;
y_ = y;
How can I handle this problem? Why is the output of my MATLAB Function and Memory2 not defined as "1"? Can I define the output variable to fix this problem?
Kaustubha Govind on 15 Jul 2014
I think it is the loop in your model that is confusing Simulink propagation. You may want to insert a Signal Specification block right before the MATLAB Function block, and specify the signal dimensions.
More Answers (2)
Azzi Abdelmalek on 15 Jul 2014
In your function you are using the second element of u, remove the mux block, and just connect the switch output to your function.
omar sheishaa on 9 Dec 2018
i have a problem while depolying the below model on android device "Simulink cannot determine sizes and/or types of the outputs for block 'slexHARAndroidExample/predictActivity' 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." although it worked before
my model is as below
also below is the code of the "predictactivity" block
function y = predictActivity(u)%#codegen
% predictActivity - predict human activity based on trained model stored in
% EnsembleModelAndroid.mat file.
% Copyright 2017 The MathWorks, Inc.
mdl = loadCompactModel('EnsembleModel.mat');
y = predict(mdl,u);