Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Please login or create an account
Change language to: English - Français - Português - 日本語 -
Справка Scilab >> Matlab to Scilab Conversion Tips > Matlab-Scilab equivalents > F > find (Matlab function)

find (Matlab function)

Find indices and values of nonzero elements

Matlab/Scilab equivalent

Matlab Scilab

Particular cases

Matlab function can work with complex values what is not possible in Scilab, however, using abs it is very easy to have the same results.

Note that Scilab function can only return two output values and Matlab one can return a third value that can be computed according to the first two output matrices as explained in Matlab help.

For example, in [i,j,v]=find(X), v is equal to: X(i+(j-1))*size(X,1).

Another great difference between Scilab and Matlab is that Matlab returns column vectors of indices when X is a column vector or a matrix but Scilab always returns row vectors. For this kind of input, use matrix to get the same output value...what is done mtlb_find()

Scilab Enterprises
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Tue Feb 14 15:13:37 CET 2017