Store calculated answer for each Frame in a vector
3 次查看(过去 30 天)
显示 更早的评论
im using an auto correllation script to identify the given pitch of a wav file. The script works nicely but i now require to know the max and min frequency. I thought it would be useful to store each answer in a vector, so i could use the max / min arguments to achieve this. Im not sure how to extract each answer, and make the script run whilst moving along the audio file and storing the results. Do i need some sort of loop? Im pretty stuck on this so any help would be really appreciated! I attatched the matlab script and the .wav file im using. Thanks!
0 个评论
回答(1 个)
KSSV
2020-3-4
If you have an array and you want to store the max and min value in a vector use:
themax = zeros(10,1) ;
themin = zeros(10,1) ;
for i = 1:10
w = rand(100,1) ; % varying signal for demo
themax(i) = max(w) ;
themin(i) = min(w) ;
end
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Audio I/O and Waveform Generation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!