<< NL_F_RandVectorCoord NL_F: Function NL_F_RandVectorNoRepl >>

NARVAL >> NL_F: Function > NL_F_RandVectorJifI

NL_F_RandVectorJifI

Generate a vector of integer values between 1 and N, distinct from an input vector.

Calling Sequence

[W] = NL_F_RandVectorJifI(V,N)

Arguments

V :

Vector of integers.

N :

Threshold.

W :

Vector of random integers.

Description

NL_F_RandVectorJifI generates the vector of integers that are different for each index from the integers of the vector with .

Examples

n=10;//maximum value
v=1:10;//vector
//v=[1 2 3 4 5 6 7 8 9 10]
//w=[w1 w2 w3 w4 w5 w6 w7 w8 w9 w10]
//w1<>v1
//w2<>v2
//w3<>v3
//w4<>v4
//w5<>v5
//w6<>v6
//w7<>v7
//w8<>v8
//w9<>v9
//w10<>v10
[w]=NL_F_RandVectorJifI(v,n)//application of NL_F_RandVectorJifI

Dependency

NL_F_RandVector0nminus1

Report an issue
<< NL_F_RandVectorCoord NL_F: Function NL_F_RandVectorNoRepl >>