Why is my variable undefined?
古いコメントを表示
Could someone tell me why 'g' is undefined?
採用された回答
その他の回答 (1 件)
Rik
2018 年 4 月 27 日
Not all options for your if-structure will result in defining g
if age<1
a=.4;
else
if (age>=1) && (age<3)
a=.6;
elseif (age>=3) && (age<5)
a=.7;
elseif (age>=5) && (age<10)
a=.5;
else
%only here g will be defined
カテゴリ
ヘルプ センター および File Exchange で Testing Frameworks についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!