How to implement the following?

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일

0 개 추천

if a + b == 1 && 0 <= a && b <= 1
%loop goes here
else
pause(inf); %"wait until those conditions are true"
end

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Statistics and Machine Learning Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by