% recorder = audiorecorder(8000,16,1)
% recordblocking(recorder,2)
% audioarray = getaudiodata(recorder)
% play(recorder);
% plot(audioarray);
% fileID =  fopen('Encender1.txt','w');
% %fprintf(fileID, 'test\n\n');
% fprintf(fileID, '%d', audioarray);
% fclose(fileID);


clear all
close all
clc

recObj = audiorecorder(48000, 16, 1);
recObj2 = audiorecorder(48000, 16, 1);
recObj3 = audiorecorder(48000, 16, 1);
recObj4 = audiorecorder(48000, 16, 1);


input('Press to record voice');
recordblocking(recObj, 1);
y = getaudiodata(recObj);

input('Press to record voice');
recordblocking(recObj2, 1);
x = getaudiodata(recObj2);

input('Press to record voice');
recordblocking(recObj3, 1);
z = getaudiodata(recObj3);

input('Press to record voice');
recordblocking(recObj4, 1);
w = getaudiodata(recObj4);


subplot(2,2,1);
plot(y)
title('Comando Calido')

subplot(2,2,2);
plot(x)
title('Comando Templado')

subplot(2,2,3);
plot(z)
title('Comando Frio')

subplot(2,2,4);
plot(w)
title('Comando Apagar Sistema')



