How do i include every second peak only?

2 views (last 30 days)
Morten Jørgensen
Morten Jørgensen on 4 Dec 2018
Answered: KSSV on 4 Dec 2018
X is my data, and I've used the peakfinder function, I want to store it in step
in one row I want to include peak 1 and 2, next row peak 3 and 4 and so on.
for l=1:length(peakLoc)-1
step{length(step)+1} =X(peakLoc(l):peakLoc(l+1),:);

Answers (1)

KSSV on 4 Dec 2018
A = rand(10,1) ;
iwant = A(2:2:end)


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!