You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
92 lines
2.4 KiB
92 lines
2.4 KiB
set terminal pngcairo size 800,600 font "Arial,12"
|
|
|
|
# 課題1
|
|
set output 'kadai1.png'
|
|
set xlabel "Time [msec]"
|
|
set ylabel "Normalized Amplitude"
|
|
set xrange [0:30]
|
|
set yrange [-1:1]
|
|
set grid
|
|
plot 'kadai1.txt' using 1:2 with lines title "sample01.sw"
|
|
|
|
# 課題2 (リニア)
|
|
set output 'kadai2_linear.png'
|
|
set xlabel "Frequency [Hz]"
|
|
set ylabel "Amplitude"
|
|
set xrange [0:8000]
|
|
set autoscale y
|
|
set grid
|
|
plot 'kadai2_dft.txt' using 1:2 with lines title "DFT", \
|
|
'kadai2_fft.txt' using 1:2 with lines title "FFT"
|
|
|
|
# 課題2 (dB)
|
|
set output 'kadai2_db.png'
|
|
set xlabel "Frequency [Hz]"
|
|
set ylabel "Amplitude [dB]"
|
|
set xrange [0:8000]
|
|
set yrange [-90:0]
|
|
set grid
|
|
plot 'kadai2_dft.txt' using 1:3 with lines title "DFT", \
|
|
'kadai2_fft.txt' using 1:3 with lines title "FFT"
|
|
|
|
# 課題3 (リニア)
|
|
set output 'kadai3_linear.png'
|
|
set xlabel "Frequency [Hz]"
|
|
set ylabel "Amplitude"
|
|
set xrange [0:8000]
|
|
set autoscale y
|
|
set grid
|
|
plot 'kadai2_fft.txt' using 1:2 with lines title "No Window", \
|
|
'kadai3_window.txt' using 1:2 with lines title "Hanning Window"
|
|
|
|
# 課題3 (dB)
|
|
set output 'kadai3_db.png'
|
|
set xlabel "Frequency [Hz]"
|
|
set ylabel "Amplitude [dB]"
|
|
set xrange [0:8000]
|
|
set yrange [-90:0]
|
|
set grid
|
|
plot 'kadai2_fft.txt' using 1:3 with lines title "No Window", \
|
|
'kadai3_window.txt' using 1:3 with lines title "Hanning Window"
|
|
|
|
# 課題4 (dB - 各母音個別)
|
|
set xlabel "Frequency [Hz]"
|
|
set ylabel "Amplitude [dB]"
|
|
set xrange [0:8000]
|
|
set yrange [-90:0]
|
|
set grid
|
|
|
|
set output 'kadai4_a_db.png'
|
|
plot 'kadai4_a.txt' using 1:3 with lines title "/a/"
|
|
|
|
set output 'kadai4_i_db.png'
|
|
plot 'kadai4_i.txt' using 1:3 with lines title "/i/"
|
|
|
|
set output 'kadai4_u_db.png'
|
|
plot 'kadai4_u.txt' using 1:3 with lines title "/u/"
|
|
|
|
set output 'kadai4_e_db.png'
|
|
plot 'kadai4_e.txt' using 1:3 with lines title "/e/"
|
|
|
|
set output 'kadai4_o_db.png'
|
|
plot 'kadai4_o.txt' using 1:3 with lines title "/o/"
|
|
|
|
# 発展課題1 (スペクトログラム)
|
|
set pm3d map
|
|
set xlabel "Time [sec]"
|
|
set ylabel "Frequency [Hz]"
|
|
set xrange [0:*]
|
|
set yrange [0:8000]
|
|
set zrange [-90:0]
|
|
set cbrange [-90:0]
|
|
set cblabel "Amplitude [dB]"
|
|
|
|
# モノクロ表示(大きいところが黒、小さいところが白)
|
|
set palette defined (-90 "white", 0 "black")
|
|
set output 'hatten1_mono.png'
|
|
splot 'spectrogram.txt' using 1:2:3 notitle
|
|
|
|
# カラー表示(Jet風カラーマップ)
|
|
set palette rgbformulae 22,13,-31
|
|
set output 'hatten1_color.png'
|
|
splot 'spectrogram.txt' using 1:2:3 notitle
|
|
|