remove an element from vector

3 ビュー (過去 30 日間)
Rakshmy  C S
Rakshmy C S 2012 年 2 月 3 日
Hi, I need to find intersection of two vectors. After intersection if 0 is present i need to remove 0. Can anyone help me.

採用された回答

Walter Roberson
Walter Roberson 2012 年 2 月 3 日
V(V==0) = [];
Or you could use
V = setdiff(V,0);

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLanguage Fundamentals についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by