how to do 1d vector deletion?

1 回表示 (過去 30 日間)
manishkumar bante
manishkumar bante 2015 年 2 月 14 日
回答済み: Zoltán Csáti 2015 年 2 月 14 日
i created an array as a=<1*5000>(i.e. 1 column and 50000 rows). i need to delete the elements of position having value 132. and i need to delete the elements starting from address 20000 to 50000. so, ans. me as soon as any one can...

回答 (1 件)

Zoltán Csáti
Zoltán Csáti 2015 年 2 月 14 日
% First, delete from index 20000 to 50000
v = v(1:19999);
% Delete the index containing the value 132
v = v(v~=132);

カテゴリ

Help Center および File ExchangeOperators and Elementary Operations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by