How to implement the following?
3 views (last 30 days)
Show older comments
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 Comments
Accepted Answer
Walter Roberson
on 27 Aug 2012
if a + b == 1 && 0 <= a && b <= 1
%loop goes here
else
pause(inf); %"wait until those conditions are true"
end
0 Comments
More Answers (0)
See Also
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!