Remove from a vector a certain number of elements

2 ビュー (過去 30 日間)
Francesco Lucarelli
Francesco Lucarelli 2021 年 7 月 9 日
回答済み: G A 2021 年 7 月 9 日
Hi all,
I have a signal stored in a vector, called stim.
with findpeaks i created a vector called stim1 that is the vector cointainit the peak of my signal.
Then i have another vector stim2 that is the vector containing peaks of my signal that have a minimum distance between them,
What i want is the to remove from stim1 the vector stim2, in this way i should obtain a vector with the peaks minus those that have a minum distance equale to a certain value. a sort of complementary vector of stim2
How should i do that ?
Thanks a lot in advance !!

採用された回答

G A
G A 2021 年 7 月 9 日
sim3 = sim1;
sim3(sim3==sim2) = [];

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDescriptive Statistics についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by