MATLAB: How to implement the following

conditionImage Processing Toolbox

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

Best Answer

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