How to implement the following?

4 Ansichten (letzte 30 Tage)
Sabarinathan Vadivelu
Sabarinathan Vadivelu am 27 Aug. 2012
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

Akzeptierte Antwort

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

Weitere Antworten (0)

Kategorien

Mehr zu Statistics and Machine Learning Toolbox finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by