remove an element from vector

7 views (last 30 days)
Hi, I need to find intersection of two vectors. After intersection if 0 is present i need to remove 0. Can anyone help me.

Accepted Answer

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

More Answers (0)

Categories

Find more on Modeling in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!