我正在学习Matlab,现在正在使用函数chirp。
freq = 1/11025; duration = 1.5; c = 0:freq:duration; y = chirp(c,0,150,duration)
问题是,它不会止步于1.5。相反,它止步于1.65。但我不知道为什么。
发布于 2021-10-01 11:42:52
您对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')在此示例中,它提供了以下输出:

您可以参考documentation了解更多详细信息。这应该是一种更严格的定义信号的方式。
https://stackoverflow.com/questions/69404971
复制相似问题