subeen

결과보고서 변경

No preview for this file type
1 +[data, fs] = audioread('rubber.wav');
2 +data_fft = fft(data);
3 +plot(abs(data_fft(:,1)));
4 +xlim([0 500])
5 +xlabel("Frequency")
6 +ylabel("Amplitude")
7 +ylim([0 110])
8 +set(gcf,'Color','w')
9 +
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
6 % Write a WAVE (|.wav|) file in the current folder. 6 % Write a WAVE (|.wav|) file in the current folder.
7 load ('handel.mat') 7 load ('handel.mat')
8 filename = 'test.wav'; 8 filename = 'test.wav';
9 -audiowrite(filename,cc/3000,Fs); 9 +audiowrite(filename,data/3000,Fs);
10 -clear cc Fs 10 +clear data Fs
11 11
12 %% 12 %%
13 % Read the data back into MATLAB using |audioread|. 13 % Read the data back into MATLAB using |audioread|.
......
...@@ -32,7 +32,7 @@ void loop() { ...@@ -32,7 +32,7 @@ void loop() {
32 Serial.println(sum); 32 Serial.println(sum);
33 delayMicroseconds(805); 33 delayMicroseconds(805);
34 //analogWrite(DAC1, sum); 34 //analogWrite(DAC1, sum);
35 - if(millis()>15000 + setUpTime){ 35 + if(millis()>10000 + setUpTime){
36 Serial.println("Recording end"); 36 Serial.println("Recording end");
37 logfile.close(); 37 logfile.close();
38 while(1){} 38 while(1){}
......
No preview for this file type
No preview for this file type