Logarithmically space a vector

12 次查看(过去 30 天)
I am trying to logarithmically space out these center frequnecies. I am unsure how I would do that. At first I though to use logspace instead of linspace but logspace uses base 10. So if I switched it the range would actually be 10^50 to 10^8000 which I do not want. Should I just recaculate what log values are closest to these numbers or is there a better way? Thank you for your time!
numFilts=32;
CenterFreqs = linspace(50, 8000, numFilts);
CF1 = CenterFreqs - BW/2; %Lower cutoff frequency
CF2 = CenterFreqs + BW/2; %Upper cutoff frequency

采纳的回答

Torsten
Torsten 2024-1-28
移动:Torsten 2024-1-28
Maybe you mean
numFilts=32;
CenterFreqs = logspace(log10(50), log10(8000), numFilts)
CenterFreqs = 1×32
1.0e+03 * 0.0500 0.0589 0.0694 0.0817 0.0962 0.1134 0.1335 0.1573 0.1853 0.2182 0.2570 0.3027 0.3566 0.4200 0.4947 0.5827 0.6864 0.8085 0.9523 1.1217 1.3212 1.5563 1.8331 2.1592 2.5432 2.9956 3.5285 4.1561 4.8954 5.7662
plot(1:32,CenterFreqs)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by