필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Can anyone give me a simple while and if statemet for this problem, please

조회 수: 1 (최근 30일)
Kulaea Taueveeve Pauu
Kulaea Taueveeve Pauu 2018년 10월 16일
마감: MATLAB Answer Bot 2021년 8월 20일
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

답변 (2개)

Haritha
Haritha 2018년 10월 16일
Hi,
Install updated phased array antenna toolbox in add ons

Image Analyst
Image Analyst 2018년 10월 16일
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.

이 질문은 마감되었습니다.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by