Problem with 'MinPeakVariance' in findpeak().
1 次查看(过去 30 天)
显示 更早的评论
Hello @image Analyst, I am trying to run this demo program
While using findpeak function to get minimum and maximum value "MinPeakProminence" is not supporting in matlab13a. which alternate function can i use instead it?
I tried to get maximum and minimum value by using MinPeakHeight instead 'MinPeakProminence' but i am only getting maximum value not the minimum. what is the problem i am not able to find. what is wrong i am doing? what i did is here.
% Find the range of the peaks peakRange = max(distances) - min(distances); minPeakHeight = 0.5 * peakRange; % Find the peaks
%[peakValues, peakIndexes] = findpeaks(distances, 'MinPeakProminence', minPeakHeight); [peakValues, peakIndexes] = findpeaks( distances,'MinPeakHeight',minPeakHeight);
% Find the valueys. %[valleyValues, valleyIndexes] = findpeaks(-distances, 'MinPeakProminence', minPeakHeight);
[valleyValues, valleyIndexes] = findpeaks( -distances,'-MinPeakHeight', minPeakHeight); numVertices(k) = max([length(peakValues), length(valleyValues)]);
0 个评论
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!