Maximum value from data
Ältere Kommentare anzeigen
Hey guys,
i have a problem with the maxk and findpeaks function from matlab. I have a dataset with thousands of items and I want to display the 25 largest items in the order they appear in the dataset. First i used the maxk function to get the 25 highest values. so far so good i got my 25 values but in the wrong order. Then i tried to use the findpeaks function on my outgoing dataset and used for the 'MinPeakHeight' the lowest value from the maxk funtion. But in the end I did not have 25 items but only 22. What did i wrong?
n = 25;
Peaks = Output.Results_interval_analysis.Untitled.max_abs_in_V;
n_Peaks = maxk(Peaks,n);
% so here i got my 25 values from high to low
[pks_Peaks, locs_Peaks] = findpeaks(Peaks,'MinPeakHeight',n_Peaks(1, n))
% after this step i only got 22 values
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Descriptive Statistics finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!