remove an element from vector

5 Ansichten (letzte 30 Tage)
Rakshmy  C S
Rakshmy C S am 3 Feb. 2012
Hi, I need to find intersection of two vectors. After intersection if 0 is present i need to remove 0. Can anyone help me.

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 3 Feb. 2012
V(V==0) = [];
Or you could use
V = setdiff(V,0);

Weitere Antworten (0)

Kategorien

Mehr zu Language Fundamentals finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by