2014-03-05 47 views

回答

0

使用索引來限制您的數據向量。例如:

f = linspace(0,2000,10000); %// assumed frequency values 
y = rand(size(f)); %// example y values. Sames size as frequency vector 

ind = f>=0 & f<= 135; %// logical index to select desired range 
[peaks, locs] = findpeaks(y(ind)); 
+0

非常感謝。它的工作 – user3217416

+0

@ user3217416請upvote您選擇的答案以及。 – kkuilla

+0

@kkuilla我仍然缺乏投票回答所需的聲望 – user3217416