Scilab Reference Manual |
---|
intersect — returns the vector of common values of two vectors
[v, [ka,kb]]=intersect(a,b)
a | : vector of real numbers or strings |
b | : vector of real numbers or strings |
v | : row vector of real numbers or strings |
ka | : row vector of integers |
kb | : row vector of integers |
intersect(a,b) returns a sorted row vector of common values of two vectors of a and b.
[v,ka,kb]=intersect(a,b) also returns index vectors ka and kb such that v=a(ka) and v=b(kb).
A=round(5*rand(10,1)); B=round(5*rand(7,1)); intersect(A,B) [N,ka,kb]=intersect(A,B) intersect('a'+string(A),'a'+string(B))
<< interp | intsplin >> |