채택된 답변

Walter Roberson
Walter Roberson 2018년 4월 27일

1 개 추천

You only define g if age >= 8.
Perhaps you want an "end" after you assign a=0 after your age test.

추가 답변 (1개)

Rik
Rik 2018년 4월 27일

1 개 추천

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에 대해 자세히 알아보기

질문:

2018년 4월 27일

댓글:

2018년 4월 27일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by