Matlab Stateflow错误:没有对数据的完整分配

时间:2018-09-15 13:48:20

标签: matlab stateflow

使用matlab 2013b。我在状态流中收到此错误

即使在此处使用数据,也没有对图表中的数据'badRvsPowerDetectedCount'(#757)进行完全分配。请注意,按元素分配,例如“ y(1)= 1”,不算作完整分配。

对于Stateflow图的局部变量和输出,即使在模型资源管理器中已完全指定类型/大小/复杂性,也需要完整分配。只要在模型资源管理器中将类型完全指定为“ Bus:typename”并且不继承或参数化,就可以省略结构类型的完整分配。 发布错误的状态:

RESET
entry, during, exit:
% Initialize variable
for pulseStateForLoop=1:(maxPulseStates)
    badRvsPowerDetectedCount(pulseStateForLoop) = 0;
end

transition on [enable(pulseState) ==  fi(1,0,1,0)] to

WAIT_FOR_BAD_REVERSE_POWER
during:
% If state ftr check is disabled
if(enable(pulseState) ==  fi(0,0,1,0))
    badRvsPowerDetectedCount(pulseState+1) = 0;

    % Increment count on bad value
elseif(reversePower > rvsPwrThreshold)
    % saturate
    if(badRvsPowerDetectedCount(pulseState+1) + 1 < MAX_32_BITS)
        badRvsPowerDetectedCount(pulseState+1) = badRvsPowerDetectedCount(pulseState+1) + 1;
    else
        badRvsPowerDetectedCount(pulseState+1) = badRvsPowerDetectedCount(pulseState+1);
    end

    % reset count on good value
else
    badRvsPowerDetectedCount(pulseState+1) = 0;
end
during,exit:
% Reset ftrFault to false
ftrFaultOccured = fi(0,0,1,0);

我正在尝试索引一个数组并在我的图表中分配该数组的1个元素。任何帮助将不胜感激

谢谢,阿米什人

0 个答案:

没有答案