I have the following MATLAB code which does plotting while recording a voice at the same time. I want to add lines so that it automatically recognizes a pattern from the plott
    조회 수: 3 (최근 30일)
  
       이전 댓글 표시
    
close all
clear all
clc
%Define parameters
fs = 96000; % Sampling frequency
nBits = 24; % Number of bits
nChannels = 1; % Number of channels
duration = inf; % Duration of recording in seconds
%Create recorder object
recObj = audiorecorder(fs, nBits, nChannels);
disp('Start Recording:')
recObj.record(duration);
while recObj.isrecording()
    pause(0.1);
    plot(recObj.getaudiodata());
    title('The recording of ')
    xlabel('Time')
    ylabel('Audio Signal')
    drawnow();
%Check for key press
if isequal(get(gcf,'CurrentKey'),'escape')
%Stop recording if 'Escape' is pressed
break;
end
end 
disp('End of Recording');
댓글 수: 0
답변 (0개)
참고 항목
카테고리
				Help Center 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
