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 CenterFile Exchange에서 Language Fundamentals에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by