Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.3.3 - English

Change language to:
Français - 日本語 - Português

Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function

Scilab help >> Elementary Functions > Search and sort > vectorfind

vectorfind

finds in a matrix rows or columns matching a vector

Calling Sequence

ind = vectorfind(m,v[,job])

Arguments

m

a matrix of any type (the same type as v).

v

a vector of any type (the same type as m).

job

A character string: optional flag with possible values "r" to look for matching rows or "c" to look for matching columns. Default value is "r".

ind

row vector containing indices of matching rows or columns

Description

Finds in a matrix rows or columns matching a vector.

Examples

alr=[1,2,2;
     1,2,1;
     1,1,2;
     1,1,1;
     1,2,1];

ind = vectorfind(alr,[1,2,1],'r')
ind = vectorfind(string(alr),string([1,2,1]),'r')

See Also

  • find — find indices of boolean vector or matrix true elements
  • gsort — sorting by quick sort agorithm

Authors

R. Nikoukhah, S. Steer INRIA

<< lex_sort Search and sort Set operations >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Wed Oct 05 12:09:40 CEST 2011