Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
6.0.1 - Français

Change language to:
English - 日本語 - 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

Aide de Scilab >> Fonctions Elémentaires > Chercher et trier > vectorfind

vectorfind

finds in a matrix rows or columns matching a vector

Syntax

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 — trouve les indices des éléments vrais d'un vecteur ou d'une matrice de booléens
  • gsort — tri par l'algorithme "quick sort"
Report an issue
<< members Chercher et trier Ensembles >>

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:
Mon Feb 12 19:15:27 CET 2018