remove an element from vector

2 vues (au cours des 30 derniers jours)
Rakshmy  C S
Rakshmy C S le 3 Fév 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.

Réponse acceptée

Walter Roberson
Walter Roberson le 3 Fév 2012
V(V==0) = [];
Or you could use
V = setdiff(V,0);

Plus de réponses (0)

Catégories

En savoir plus sur Language Fundamentals dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by