<< NL_F_RandVectorPermut NL_F: Function NL_F_RemoveVecIndex >>

NARVAL >> NL_F: Function > NL_F_RemoveFirstOcc

NL_F_RemoveFirstOcc

Remove the first occurence of a value within a vector.

Calling Sequence

[V] = NL_F_RemoveFirstOcc(V,N)

Arguments

V :

Vector.

N :

Value.

Description

NL_F_RemoveFirstOcc removes the first occurence of the value N inside the vector V, if it is present a single time.

Examples

v=[1 2 3 4 5 6 7];//original vector
vl1=3;//value under consideration
v1=NL_F_RemoveFirstOcc(v,vl1)//application of NL_F_RemoveFirstOcc
vl2=6;
v2=NL_F_RemoveFirstOcc(v,vl2)

Report an issue
<< NL_F_RandVectorPermut NL_F: Function NL_F_RemoveVecIndex >>