home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Languages / RLaB 1.18c / manual / find.tex < prev    next >
LaTeX Document  |  1994-05-01  |  1.5 KB  |  [TEXT/ttxt]

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: LaTeX Document (document/latex).

You can browse this item here: find.tex

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert LaTeX Document (document/latex) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file LaTeX document text default
99% file LaTeX document, ASCII text, with CR line terminators default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/281 LaTeX (Subdocument) default
100% detectItEasy Format: plain text[CR] default (weak)


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[ttxt]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 5c 73 65 63 74 69 6f 6e | 7b 66 69 6e 64 20 2d 2d |\section|{find --|
|00000010| 2d 20 46 69 6e 64 20 6e | 6f 6e 2d 7a 65 72 6f 20 |- Find n|on-zero |
|00000020| 65 6c 65 6d 65 6e 74 73 | 7d 0d 5c 6c 61 62 65 6c |elements|}.\label|
|00000030| 7b 66 6e 3a 66 69 6e 64 | 7d 0d 5c 69 6e 64 65 78 |{fn:find|}.\index|
|00000040| 7b 66 69 6e 64 28 29 7d | 0d 5c 69 6e 64 65 78 7b |{find()}|.\index{|
|00000050| 66 69 6e 64 20 6e 6f 6e | 2d 7a 65 72 6f 20 65 6c |find non|-zero el|
|00000060| 65 6d 65 6e 74 73 7d 0d | 5c 62 65 67 69 6e 7b 72 |ements}.|\begin{r|
|00000070| 61 69 6c 7d 0d 46 69 6e | 64 20 3a 20 27 66 69 6e |ail}.Fin|d : 'fin|
|00000080| 64 27 20 27 28 27 20 4d | 61 74 72 69 78 20 27 29 |d' '(' M|atrix ')|
|00000090| 27 20 3b 0d 5c 65 6e 64 | 7b 72 61 69 6c 7d 0d 0d |' ;.\end|{rail}..|
|000000a0| 5c 76 65 72 62 2b 66 69 | 6e 64 2b 20 66 69 6e 64 |\verb+fi|nd+ find|
|000000b0| 73 20 74 68 65 20 69 6e | 64 69 63 65 73 20 6f 66 |s the in|dices of|
|000000c0| 20 74 68 65 20 6e 6f 6e | 2d 7a 65 72 6f 20 65 6c | the non|-zero el|
|000000d0| 65 6d 65 6e 74 73 20 6f | 66 20 74 68 65 20 61 72 |ements o|f the ar|
|000000e0| 67 75 6d 65 6e 74 0d 6d | 61 74 72 69 78 2e 20 20 |gument.m|atrix. |
|000000f0| 54 68 65 20 61 72 67 75 | 6d 65 6e 74 20 69 73 20 |The argu|ment is |
|00000100| 74 72 65 61 74 65 64 20 | 61 73 20 62 65 69 6e 67 |treated |as being|
|00000110| 20 61 20 76 65 63 74 6f | 72 2c 20 73 6f 20 74 68 | a vecto|r, so th|
|00000120| 65 20 72 65 74 75 72 6e | 0d 76 61 6c 75 65 73 20 |e return|.values |
|00000130| 61 72 65 20 6a 75 73 74 | 20 65 6c 65 6d 65 6e 74 |are just| element|
|00000140| 20 6e 75 6d 62 65 72 73 | 2c 20 6e 6f 74 20 72 6f | numbers|, not ro|
|00000150| 77 20 61 6e 64 20 63 6f | 6c 75 6d 6e 20 6e 75 6d |w and co|lumn num|
|00000160| 62 65 72 73 2e 20 20 54 | 68 65 0d 66 6f 72 6d 61 |bers. T|he.forma|
|00000170| 74 20 6f 66 20 74 68 65 | 20 72 65 74 75 72 6e 20 |t of the| return |
|00000180| 76 61 6c 75 65 73 20 69 | 73 20 61 20 72 6f 77 20 |values i|s a row |
|00000190| 76 65 63 74 6f 72 2e 0d | 0d 54 68 69 73 20 66 75 |vector..|.This fu|
|000001a0| 6e 63 74 69 6f 6e 20 63 | 61 6e 20 62 65 20 75 73 |nction c|an be us|
|000001b0| 65 64 20 74 6f 20 74 65 | 73 74 20 66 6f 72 20 65 |ed to te|st for e|
|000001c0| 6c 65 6d 65 6e 74 73 20 | 74 68 61 74 20 6d 65 65 |lements |that mee|
|000001d0| 74 20 61 20 63 65 72 74 | 61 69 6e 20 63 72 69 74 |t a cert|ain crit|
|000001e0| 65 72 69 61 2e 0d 0d 5c | 70 61 72 61 67 72 61 70 |eria...\|paragrap|
|000001f0| 68 7b 45 78 61 6d 70 6c | 65 7d 0d 5c 69 6e 64 65 |h{Exampl|e}.\inde|
|00000200| 78 7b 65 78 61 6d 70 6c | 65 20 6f 66 20 66 69 6e |x{exampl|e of fin|
|00000210| 64 28 29 7d 0d 5c 69 6e | 64 65 78 7b 66 69 6e 64 |d()}.\in|dex{find|
|00000220| 28 29 21 65 78 61 6d 70 | 6c 65 7d 0d 5c 62 65 67 |()!examp|le}.\beg|
|00000230| 69 6e 7b 76 65 72 62 61 | 74 69 6d 7d 0d 3e 20 62 |in{verba|tim}.> b|
|00000240| 20 3d 20 65 79 65 28 33 | 2c 33 29 0d 20 62 20 3d | = eye(3|,3). b =|
|00000250| 0d 20 20 20 20 20 20 20 | 20 31 20 20 20 20 20 20 |. | 1 |
|00000260| 20 20 20 20 30 20 20 20 | 20 20 20 20 20 20 20 30 | 0 | 0|
|00000270| 20 20 0d 20 20 20 20 20 | 20 20 20 30 20 20 20 20 | . | 0 |
|00000280| 20 20 20 20 20 20 31 20 | 20 20 20 20 20 20 20 20 | 1 | |
|00000290| 20 30 20 20 0d 20 20 20 | 20 20 20 20 20 30 20 20 | 0 . | 0 |
|000002a0| 20 20 20 20 20 20 20 20 | 30 20 20 20 20 20 20 20 | |0 |
|000002b0| 20 20 20 31 20 20 0d 3e | 20 66 69 6e 64 28 62 29 | 1 .>| find(b)|
|000002c0| 0d 20 20 20 20 20 20 20 | 20 31 20 20 20 20 20 20 |. | 1 |
|000002d0| 20 20 20 20 35 20 20 20 | 20 20 20 20 20 20 20 39 | 5 | 9|
|000002e0| 20 20 0d 3e 20 63 20 3d | 20 5b 6e 61 6e 28 29 2c | .> c =| [nan(),|
|000002f0| 33 2c 30 2c 32 2c 30 2c | 30 2c 31 2e 34 33 2c 69 |3,0,2,0,|0,1.43,i|
|00000300| 6e 66 28 29 5d 0d 20 63 | 20 3d 0d 20 6d 61 74 72 |nf()]. c| =. matr|
|00000310| 69 78 20 63 6f 6c 75 6d | 6e 73 20 31 20 74 68 72 |ix colum|ns 1 thr|
|00000320| 75 20 37 0d 20 20 20 20 | 20 20 4e 61 4e 20 20 20 |u 7. | NaN |
|00000330| 20 20 20 20 20 20 20 33 | 20 20 20 20 20 20 20 20 | 3| |
|00000340| 20 20 30 20 20 20 20 20 | 20 20 20 20 20 32 20 20 | 0 | 2 |
|00000350| 20 20 20 20 20 20 20 20 | 30 20 20 20 20 20 20 20 | |0 |
|00000360| 20 20 20 30 20 20 20 20 | 20 20 20 31 2e 34 33 20 | 0 | 1.43 |
|00000370| 20 0d 0d 20 6d 61 74 72 | 69 78 20 63 6f 6c 75 6d | .. matr|ix colum|
|00000380| 6e 73 20 38 20 74 68 72 | 75 20 38 0d 20 49 6e 66 |ns 8 thr|u 8. Inf|
|00000390| 69 6e 69 74 79 20 20 0d | 3e 20 63 20 3d 20 5b 33 |inity .|> c = [3|
|000003a0| 2c 30 2c 32 2c 30 2c 30 | 2c 31 2e 34 33 2c 69 6e |,0,2,0,0|,1.43,in|
|000003b0| 66 28 29 5d 0d 20 63 20 | 3d 0d 20 6d 61 74 72 69 |f()]. c |=. matri|
|000003c0| 78 20 63 6f 6c 75 6d 6e | 73 20 31 20 74 68 72 75 |x column|s 1 thru|
|000003d0| 20 37 0d 20 20 20 20 20 | 20 20 20 33 20 20 20 20 | 7. | 3 |
|000003e0| 20 20 20 20 20 20 30 20 | 20 20 20 20 20 20 20 20 | 0 | |
|000003f0| 20 32 20 20 20 20 20 20 | 20 20 20 20 30 20 20 20 | 2 | 0 |
|00000400| 20 20 20 20 20 20 20 30 | 20 20 20 20 20 20 20 31 | 0| 1|
|00000410| 2e 34 33 20 20 20 49 6e | 66 69 6e 69 74 79 20 20 |.43 In|finity |
|00000420| 0d 0d 3e 20 66 69 6e 64 | 28 63 29 0d 20 20 20 20 |..> find|(c). |
|00000430| 20 20 20 20 31 20 20 20 | 20 20 20 20 20 20 20 33 | 1 | 3|
|00000440| 20 20 20 20 20 20 20 20 | 20 20 36 20 20 20 20 20 | | 6 |
|00000450| 20 20 20 20 20 37 20 20 | 0d 3e 20 64 20 3d 20 72 | 7 |.> d = r|
|00000460| 61 6e 64 28 32 2c 35 29 | 0d 20 64 20 3d 0d 20 20 |and(2,5)|. d =. |
|00000470| 20 20 20 20 30 2e 37 20 | 20 20 20 20 30 2e 30 39 | 0.7 | 0.09|
|00000480| 31 38 20 20 20 20 20 20 | 20 30 2e 39 36 20 20 20 |18 | 0.96 |
|00000490| 20 20 20 30 2e 34 34 31 | 20 20 20 20 20 20 30 2e | 0.441| 0.|
|000004a0| 39 32 34 20 20 0d 20 20 | 20 20 20 30 2e 39 35 20 |924 . | 0.95 |
|000004b0| 20 20 20 20 20 30 2e 39 | 30 32 20 20 20 20 20 20 | 0.9|02 |
|000004c0| 30 2e 39 31 35 20 20 20 | 20 20 30 2e 30 37 33 35 |0.915 | 0.0735|
|000004d0| 20 20 20 20 20 30 2e 30 | 38 38 32 20 20 0d 3e 20 | 0.0|882 .> |
|000004e0| 64 20 3c 20 2e 35 0d 20 | 20 20 20 20 20 20 20 30 |d < .5. | 0|
|000004f0| 20 20 20 20 20 20 20 20 | 20 20 31 20 20 20 20 20 | | 1 |
|00000500| 20 20 20 20 20 30 20 20 | 20 20 20 20 20 20 20 20 | 0 | |
|00000510| 31 20 20 20 20 20 20 20 | 20 20 20 30 20 20 0d 20 |1 | 0 . |
|00000520| 20 20 20 20 20 20 20 30 | 20 20 20 20 20 20 20 20 | 0| |
|00000530| 20 20 30 20 20 20 20 20 | 20 20 20 20 20 30 20 20 | 0 | 0 |
|00000540| 20 20 20 20 20 20 20 20 | 31 20 20 20 20 20 20 20 | |1 |
|00000550| 20 20 20 31 20 20 0d 3e | 20 66 69 6e 64 28 64 20 | 1 .>| find(d |
|00000560| 3c 20 2e 35 29 0d 20 20 | 20 20 20 20 20 20 33 20 |< .5). | 3 |
|00000570| 20 20 20 20 20 20 20 20 | 20 37 20 20 20 20 20 20 | | 7 |
|00000580| 20 20 20 20 38 20 20 20 | 20 20 20 20 20 20 31 30 | 8 | 10|
|00000590| 20 20 0d 5c 65 6e 64 7b | 76 65 72 62 61 74 69 6d | .\end{|verbatim|
|000005a0| 7d 0d 0d 53 65 65 20 61 | 6c 73 6f 3a 20 50 61 67 |}..See a|lso: Pag|
|000005b0| 65 7e 5c 70 61 67 65 72 | 65 66 7b 66 6e 3a 61 6c |e~\pager|ef{fn:al|
|000005c0| 6c 7d 20 5c 76 65 72 62 | 2b 61 6c 6c 28 29 2b 2c |l} \verb|+all()+,|
|000005d0| 0d 50 61 67 65 7e 5c 70 | 61 67 65 72 65 66 7b 66 |.Page~\p|ageref{f|
|000005e0| 6e 3a 61 6e 79 7d 20 5c | 76 65 72 62 2b 61 6e 79 |n:any} \|verb+any|
|000005f0| 28 29 2b 2e 0d 0d 5c 6e | 65 77 70 61 67 65 0d 0d |()+...\n|ewpage..|
|00000600| 0d 0d 0d 0d | |.... | |
+--------+-------------------------+-------------------------+--------+--------+