我正在學習 Matlab,現在使用 chirp 函式。
freq = 1/11025; duration = 1.5; c = 0:freq:duration;
y = chirp(c,0,150,duration)
問題是,它不會停在 1.5。相反,它停在 1.65 。但我不知道為什么。
uj5u.com熱心網友回復:
您對 chirp() 函式的解釋不正確。以下是通過 dsp.Chirp 創建完全可定制的 chirp 函式的方法:
hChirp = dsp.Chirp(...
'TargetFrequency', 10, ...
'InitialFrequency', 0,...
'TargetTime', 10, ...
'SweepTime', 10, ...
'SamplesPerFrame', 10000, ...
'SampleRate', 1000);
plot(hChirp()); set(gcf, 'color', 'w'), grid on;
title('Chirp to 10 Hz')
在這個例子中給出了以下輸出:

您可以參考檔案以獲取更多詳細資訊。這應該是定義信號的更嚴格的方法。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/318513.html
