Info
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
Can anyone give me a simple while and if statemet for this problem, please
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
a = [ 0.40 0.35 0.15 0.30 0.10 0.10 0.07] ;
threshold_1 <= 0.25;
threshold_2 >= 0.50;
threshold = FALSE
while NOT threshold do
Receive message 'Battery low' from set (a)
if received message is 'URGENT' then
threshold = TRUE
else
Add requested message to the queue list
0 comentarios
Respuestas (2)
Haritha
el 16 de Oct. de 2018
Hi,
Install updated phased array antenna toolbox in add ons
0 comentarios
Image Analyst
el 16 de Oct. de 2018
Try this:
a = [ 0.40 0.35 0.15 0.30 0.10 0.10 0.07] ;
threshold_1 <= 0.25; % Not sure what this is for.
threshold_2 >= 0.50; % Not sure what this is for.
threshold = false;
loopCounter = 1;
maxIterations = 1000; % Some big number, more than you ever expect to need.
while ~threshold && loopCounter < maxIterations
message = ReceiveMessage(a) % Some function - not sure what it is.
if contains(message, 'URGENT', 'IgnoreCase', true)
threshold = true
else
queueList{loopCounter} = message;
end
loopCounter = loopCounter + 1;
end
celldisp(queueList); % Display contents in command window.
0 comentarios
La pregunta está cerrada.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!