How to implement the following?

조회 수: 1 (최근 30일)
Sabarinathan Vadivelu
Sabarinathan Vadivelu 2012년 8월 27일
How to implement the following? a and b are selected at random. If the following conditions true it should go inside loop. else again we should wait till those conditions true.
a+b=1 and
0 <= a,b <= 1

채택된 답변

Walter Roberson
Walter Roberson 2012년 8월 27일
if a + b == 1 && 0 <= a && b <= 1
%loop goes here
else
pause(inf); %"wait until those conditions are true"
end

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by