Variable 'a' is undefined on some execution paths. Why?
古いコメントを表示
I'm using the block named Embedded MATLAB (that link the simulink to matlab) and when I try to run the code above, return the message error: "Variable 'a' is undefined on some execution paths". Besides that, other message appears: "Parsing successful for machine: "teste1_05mar13"(#17)" What does it mean?
function y = fcn(ia,va,t)
%#eml
p = ia*va;
N=1000;
if t <= 1.0e-6
a = 0;
b = 0;
end
b = a-0.01; %"b" is the value of the same "a", but is a value that precedes in 0.01 the value "a"
a = b + (p -b)/N;
y=a;
Thanks
1 件のコメント
Caroline Rosa
2013 年 3 月 8 日
編集済み: Azzi Abdelmalek
2013 年 3 月 8 日
採用された回答
その他の回答 (1 件)
Ryad BOUKHARI
2017 年 4 月 25 日
0 投票
Hello,
I faced the same problem, and it works.
Thank you Abdelmalek.
カテゴリ
ヘルプ センター および File Exchange で MATLAB Coder についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!