Strange error message using sort( ) ?
显示 更早的评论
Hey
I am trying to locate the 10 fundamental frequencies in my power-spectrum. I know, I can find the peaks, by using the findpeaks() function. Then, I would like to sort these peaks and index them. I thought the following code would do this, but I get an error message I don't understand?
>> Y=abs(fft(channel1)); >> nyquist=ceil(length(Y)/2); >> peaks=findpeaks(Y(1:nyquist)); >> [A,I]=sort(peaks) Indexing cannot yield multiple results.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Multirate Signal Processing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!