Man Scilab

equal
Scilab Function

equal - (=) affectation, comparison equal sign

Description

- Equal sign is used to denote a value affectation to a variable.
- a == b denotes equality comparison between expressions a and b :
With matrix objects,
If a and b are matrices with same types and identical dimensions, the comparison is performed element by element and the result is a matrix of booleans.
If a and b are matrices with same types, but a or b is a 1 by 1 matrix the scalar is compared with each element of the matrix. The result is a matrix of booleans.
In The others cases the result is the boolean %f
With list objects,
If a and b are lists with identical sizes, the comparison is performed element by element and and recursively. The result is a row vector of booleans.
If a and b are lists with non equal sizes the result is the boolean %f .
With tlist and mlist object. If no overloading function is defined the list comparison method is used.
With other data types (functions, libraries,...) , the result is %t if the objects are identical and %f in the other case.

Comparison between different data types returns %f .

Examples


a=sin(3.2)
[u,s]=schur(rand(3,3))
[1:10]==4
1~=2
   
  

See Also

less ,   boolean ,   isequal ,  

Back