Scilab 6.0.0
- Scilab Help
- Matlab to Scilab Conversion Tips
- Matlab-Scilab equivalents
- A
- abs (Matlab function)
- acos (Matlab function)
- acosh (Matlab function)
- acot (Matlab function)
- acoth (Matlab function)
- acsc (Matlab function)
- acsch (Matlab function)
- all (Matlab function)
- angle (Matlab function)
- any (Matlab function)
- asec (Matlab function)
- asech (Matlab function)
- asin (Matlab function)
- asinh (Matlab function)
- atan (Matlab function)
- atan2 (Matlab function)
- atanh (Matlab function)
Scilab Help >> Matlab to Scilab Conversion Tips > Matlab-Scilab equivalents > A > all (Matlab function)
all (Matlab function)
Test to determine if all elements are nonzero
Matlab/Scilab equivalent
Matlab | Scilab |
all |
Particular cases
Matlab all function can work with complexes, what Scilab and can not, so a call to abs function can be necessary when translating from Matlab to Scilab.
- The Matlab expression B=all(A) is translated into Scilab by B=and(A):
If A is a matrix, all(A) is equivalent to all(A,1) in Matlab whereas in Scilab and(A) is a logical AND of all elements of A. If A is a multidimensional array then Matlab treats the values along the first non-singleton dimension, but Scilab returns logical AND of all elements of A.
- The Matlab expression B=all(A,dim) is translated into Scilab by B=and(A,dim):
In Scilab dim=1 is equivalent to dim="r" and dim=2 is equivalent to dim="c". In Matlab, dim can be greater then the number of dimension of A (in this case, B=A), in Scilab you will get an error message.
Comments
Add a comment:
Please login to comment this page.