How would I remove certain values of an array and put it into another array?

function [microbeInd, noLifeInd] = semTest(semData)
microbeInd = islocalmax(semData);
noLifeInd(microbeInd) = [];
end
After locating local maximas how would I make another array which is the values that are not maximas?

Answers (1)

function [microbeInd, noLifeInd] = semTest(semData)
microbeInd = islocalmax(semData);
noLifeInd=semData(~microbeInd);
end

Categories

Tags

Asked:

on 6 Nov 2020

Answered:

dpb
on 7 Nov 2020

Community Treasure Hunt

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

Start Hunting!