How to skip certain index numbers in row vector in matlab

57 ビュー (過去 30 日間)
charu shree
charu shree 2020 年 6 月 27 日
回答済み: madhan ravi 2020 年 6 月 27 日
Hello all,
I have a row vector of 50 elements. I want to apply a specific operation to all the elements except the indices number 11,21,31,41 of this row vector. How can i do this in effective and faster way. Thanks in advance....

回答 (1 件)

madhan ravi
madhan ravi 2020 年 6 月 27 日
indices = setdiff(1:50, [11,21,31,41])

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by