Plot 倍频程不能绘制光谱图
我用倍频程的代码来打印像这样的光谱图。代码来自实验室手册,但我有错误。 代码Plot 倍频程不能绘制光谱图,plot,octave,Plot,Octave,我用倍频程的代码来打印像这样的光谱图。代码来自实验室手册,但我有错误。 代码 [x, Fs, bps] = wavread('digit.wav'); alpha=0.5; %Overlap N=256;% 32ms window size figure(2) clf() specgram(x,N,Fs,hanning(N),alpha*N); xlabel('Time (s)', "fontsize", 18) ylabel('Frequency (Hz)', "fontsize", 18
[x, Fs, bps] = wavread('digit.wav');
alpha=0.5; %Overlap
N=256;% 32ms window size
figure(2)
clf()
specgram(x,N,Fs,hanning(N),alpha*N);
xlabel('Time (s)', "fontsize", 18)
ylabel('Frequency (Hz)', "fontsize", 18)
错误
>> spectogram
warning: wavread is obsolete and will be removed from a future version of Octave,please use audioread instead
warning: called from
wavread at line 62 column 5
spectogram at line 1 column 11
error: 'specgram' undefined near line 7 column 1
error: called from
spectogram at line 7 column 1
wavread
已过时,您应该改用audioread
specgram
功能是信号
包的一部分。要使用它,您应该首先加载信号包:pkg load signal
。如果尚未安装,请先从octave forge安装:pkg install signal-forge
即使是python中的任何代码都会帮助meIts给出错误,在file/home/rutherford/spectom.m syntax error`的第12行附近没有“>>spectom.m parse error”,第12行中没有任何内容。我在脚本的开头添加了pkg load signal来加载信号包。我错在哪里?我去掉了bps,它成功了,谢谢塔索斯·帕帕斯泰里亚努