[英]Bulk chirp creation in Matlab
這更有助於幫助使用信號處理工具自動創建啁啾。
所以基本上使用啁啾工具我想看看我是否可以批量生成 990 個啁啾(在 5-500Hz 的頻率范圍內上掃和下掃)所以我可以對它們進行一些統計以通過相關性定義最適合的 model無需實際輸入並生成所有這些啁啾聲。
例子:
ch_6_60_10_lin=chirp(0:0.004:10,6,10,60,'linear',90);
在 10 秒的時間間隔內產生 6Hz 和 60Hz 之間的啁啾。
我希望能夠以這些格式生成 495 個變量
ch_5_[5:500]_10_lin=chirp(0:0.004:10,5,10,[5:500],'linear',90) % where [5:500] are 495 steps
ch_[5:500]_500_10_lin=chirp(0:0.004:10,[5:500],10,500,'linear',90)
任何指向正確方向的指針將不勝感激!
您確定要將所有這些都作為自變量嗎? 將所有這些作為矩陣進行管理可能會更容易。
tVec = 0:0.004:10; % Vector of time samples
f1Vec = 5:500; % Vector of ending frequencies for the first set of chirps
f2Vec = 5:000; % Vector of starting frequencies for the second set of chirps
nChirps1 = length(f1Vec);
nChirps2 = length(f2Vec);
nTimeSamples = length(tVec);
chirpMat1 = zeros(nChirps1, nTimeSamples);
chirpMat2 = zeros(nChirps2, nTimeSamples);
for iChirp = 1:nChirps1
chirpMat1(iChirp, :) = chirp(tVec, 5, 10, f1Vec(iChirp), 'linear', 90);
end
for iChirp = 1:nChirps2
chirpMat2(iChirp, :) = chirp(tVec, f0Vec(iChirp), 10, 500, 'linear', 90);
end
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.