File: boolean.cat

package info (click to toggle)
scilab 2.6-4
  • links: PTS
  • area: non-free
  • in suites: woody
  • size: 54,632 kB
  • ctags: 40,267
  • sloc: ansic: 267,851; fortran: 166,549; sh: 10,005; makefile: 4,119; tcl: 1,070; cpp: 233; csh: 143; asm: 135; perl: 130; java: 39
file content (29 lines) | stat: -rw-r--r-- 1,133 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
boolean           Scilab Group           Scilab Objects             boolean
NAME
   boolean - Scilab Objects, boolean variables and operators & | ~
  
DESCRIPTION
   A boolean variable is %T (for "true") or %F (for "false"). These
  variables can be used to define matrices of booleans, with the usual
  syntax. Boolean matrices can be manipulated as ordinary matrices for
  elements extraction/insertion and concatenation. Note that  other usual
  operations  (+, *, -, ^, etc) are undefined for booleans matrices, three
  special operators are defined for boolean matrices:
  
 ~b         : is the element wise negation of boolean b (matrix).
            
 b1&b2      : is the element wise logical and of b1 and b2 (matrices).
            
 b1|b2      : is the  element wise logical or of b1 and b2 (matrices).
            
 Boolean variables can be used for indexing matrices or vectors.
             For instance a([%T,%F,%T],:) returns the submatrix  made of rows 1 and 3
            of a. Boolean sparse matrices are supported.
            
EXAMPLE
 [1,2]==[1,3]
 [1,2]==1
 a=1:5; a(a>2)
SEE ALSO
   matrices, or, and, not