remove an element from vector

2 visualizaciones (últimos 30 días)
Rakshmy  C S
Rakshmy C S el 3 de Feb. de 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.

Respuesta aceptada

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

Más respuestas (0)

Categorías

Más información sobre Language Fundamentals en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by