How do you remove elements (all the same number), randomly dispersed, from a (vertical) vector?

For instance, I have the following (vertical) vector x = [100 4 5 6 100 2 100 7 4 100 2]'
100 4 5 6 100 2 100 7 4 100 2
I want to remove the 100(s) from this vector to get
4 5 6 2 7 4 2
Is there a way to do that? If so, what is the code to do that?

回答 (3 件)

Youssef  Khmou
Youssef Khmou 2013 年 2 月 18 日
編集済み: Youssef Khmou 2013 年 2 月 18 日
hi, try this :
x(x==100)=[];

カテゴリ

ヘルプ センター および File ExchangeAerospace Blockset についてさらに検索

質問済み:

2013 年 2 月 18 日

Community Treasure Hunt

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

Start Hunting!

Translated by