How to implement the following?
조회 수: 1 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
채택된 답변
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
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!