How to change a sound in a specific condition

2 visualizaciones (últimos 30 días)
nor syafiqah
nor syafiqah el 29 de Nov. de 2018
Respondida: Walter Roberson el 29 de Nov. de 2018
while 1
brain=fread(bt)
if (100<brain) && ( brain<150)
disp ( 'attention')
elseif .....condition goes here
disp('meditation')
end
end
  1 comentario
KSSV
KSSV el 29 de Nov. de 2018
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.

Iniciar sesión para comentar.

Respuesta aceptada

Walter Roberson
Walter Roberson el 29 de Nov. de 2018
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

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by