How to change a sound in a specific condition

조회 수: 2 (최근 30일)
nor syafiqah
nor syafiqah 2018년 11월 29일
답변: Walter Roberson 2018년 11월 29일
while 1
brain=fread(bt)
if (100<brain) && ( brain<150)
disp ( 'attention')
elseif .....condition goes here
disp('meditation')
end
end
  댓글 수: 1
KSSV
KSSV 2018년 11월 29일
YOu have to finish your first question and then ask the second one.....theere is no discussion/ response from you on your first question and you have more or less asked a same question.

댓글을 달려면 로그인하십시오.

채택된 답변

Walter Roberson
Walter Roberson 2018년 11월 29일
conditions_list = {'?', 'attention', 'meditation'};
while 1
brain=fread(bt);
if isempty(brain); break; end
mask1 = (100<brain) & ( brain<150);
mask2 = second_test_goes_here
condition = ones(size(brain));
condition(mask1) = 2;
condition(mask2) = 3;
brain_conditions = conditions_list(condition);
disp( strjoin(brain_conditions, ' '));
end

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Scalar Volume Data에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by