我正在尝试这个 matlab 代码,但我不断收到错误消息。有什么提示吗?
%Frequency Demodulation
f_fmCarrier=1000; %frequency of FM carrier signal
f_sampling=f_fmCarrier*2; %frequency of sampling
recordFmModulatedSignal=audiorecorder(f_sampling,16,1,1);
recordblocking(recordFmModulatedSignal,5);
rFmModulatedSignal=getaudiodata(recordFmModulatedSignal);
figure(2)
subplot(3,1,1);
plot(rFmModulatedSignal,'b');
title('Recieved FM Modulated signal');
xlabel('Seconds');
ylabel('Amplitude');
fmMessageSignal=fmdemod(rFmModulatedSignal,f_fmCarrier,f_sampling,mod_index*f_fmMessageSignal);
subplot(3,1,2);
plot(fmMessageSignal,'r');
title('Demodulated signal by using fmdemod command');
xlabel('Seconds');
ylabel('Amplitude');
B_fm=fir1(401,2*(f_fmMessageSignal/f_sampling));% lowpass filter of order 401 & frequency
fmMessageSignal2=filter(B_fm,1,fmMessageSignal);
subplot(3,1,3);
plot(fmMessageSignal2,'m');
title('Demodulated signal by using a lowpass filter');
xlabel('Seconds');
ylabel('Amplitude');
错误:
Undefined function 'fmdemod' for input arguments of type 'double'.
Error in project2 (line 32)
fmMessageSignal=fmdemod(rFmModulatedSignal,f_fmCarrier,f_sampling,mod_index*f_fmMessageSignal);