How to implement the following?

3 visualizaciones (últimos 30 días)
Sabarinathan Vadivelu
Sabarinathan Vadivelu el 27 de Ag. de 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

Respuesta aceptada

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

Más respuestas (0)

Categorías

Más información sobre Statistics and Machine Learning Toolbox en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by