Embedded MATLAB Function
<br />function y = fcn(u)<br />y=0;% 因为是函数,所以对输出初始化<br />if u==1<br /> y=0;<br />elseif u==0<br /> y=1;<br />end<br /> <br />如果不对输出初始化,即函数值无法计算,会产生如下错误:y is not assigned on some execution pa