home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Languages / RLaB 1.18c / manual / ones.tex < prev    next >
LaTeX Document  |  1994-04-27  |  1.4 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: ones.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 6f 6e 65 73 20 2d 2d |\section|{ones --|
|00000010| 2d 20 4d 61 74 72 69 78 | 20 6f 66 20 6f 6e 65 73 |- Matrix| of ones|
|00000020| 7d 0d 5c 6c 61 62 65 6c | 7b 66 6e 3a 6f 6e 65 73 |}.\label|{fn:ones|
|00000030| 7d 0d 5c 69 6e 64 65 78 | 7b 6f 6e 65 73 28 29 7d |}.\index|{ones()}|
|00000040| 0d 5c 69 6e 64 65 78 7b | 6d 61 74 72 69 78 20 6f |.\index{|matrix o|
|00000050| 66 20 6f 6e 65 73 7d 0d | 5c 62 65 67 69 6e 7b 72 |f ones}.|\begin{r|
|00000060| 61 69 6c 7d 0d 4f 6e 65 | 73 20 3a 20 27 6f 6e 65 |ail}.One|s : 'one|
|00000070| 73 27 20 27 28 27 20 28 | 28 20 53 63 61 6c 61 72 |s' '(' (|( Scalar|
|00000080| 20 27 2c 27 20 53 63 61 | 6c 61 72 20 29 20 7c 20 | ',' Sca|lar ) | |
|00000090| 28 20 4d 61 74 72 69 78 | 20 29 29 20 27 29 27 20 |( Matrix| )) ')' |
|000000a0| 3b 0d 5c 65 6e 64 7b 72 | 61 69 6c 7d 0d 0d 5c 76 |;.\end{r|ail}..\v|
|000000b0| 65 72 62 2b 6f 6e 65 73 | 2b 20 63 72 65 61 74 65 |erb+ones|+ create|
|000000c0| 73 20 61 20 6d 61 74 72 | 69 78 20 77 69 74 68 20 |s a matr|ix with |
|000000d0| 65 61 63 68 20 65 6c 65 | 6d 65 6e 74 20 73 65 74 |each ele|ment set|
|000000e0| 20 74 6f 20 24 31 24 2e | 20 54 68 65 0d 61 72 67 | to $1$.| The.arg|
|000000f0| 75 6d 65 6e 74 73 20 73 | 70 65 63 69 66 79 20 74 |uments s|pecify t|
|00000100| 68 65 20 64 69 6d 65 6e | 73 69 6f 6e 73 20 6f 66 |he dimen|sions of|
|00000110| 20 74 68 65 20 6d 61 74 | 72 69 78 20 74 6f 20 62 | the mat|rix to b|
|00000120| 65 20 63 72 65 61 74 65 | 64 2e 20 20 49 66 20 74 |e create|d. If t|
|00000130| 68 65 0d 61 72 67 75 6d | 65 6e 74 20 69 73 20 61 |he.argum|ent is a|
|00000140| 20 6d 61 74 72 69 78 2c | 20 74 68 65 20 6d 61 74 | matrix,| the mat|
|00000150| 72 69 78 20 6d 75 73 74 | 20 68 61 76 65 20 74 77 |rix must| have tw|
|00000160| 6f 20 65 6c 65 6d 65 6e | 74 73 2c 20 77 69 74 68 |o elemen|ts, with|
|00000170| 20 74 68 65 0d 66 69 72 | 73 74 20 61 72 67 75 6d | the.fir|st argum|
|00000180| 65 6e 74 20 73 70 65 63 | 69 66 79 69 6e 67 20 74 |ent spec|ifying t|
|00000190| 68 65 20 6e 75 6d 62 65 | 72 20 6f 66 20 72 6f 77 |he numbe|r of row|
|000001a0| 73 2c 20 61 6e 64 20 74 | 68 65 20 73 65 63 6f 6e |s, and t|he secon|
|000001b0| 64 20 61 72 67 75 6d 65 | 6e 74 0d 73 70 65 63 69 |d argume|nt.speci|
|000001c0| 66 79 69 6e 67 20 74 68 | 65 20 6e 75 6d 62 65 72 |fying th|e number|
|000001d0| 20 6f 66 20 63 6f 6c 75 | 6d 6e 73 2e 20 20 54 68 | of colu|mns. Th|
|000001e0| 69 73 20 69 73 20 74 68 | 65 20 73 61 6d 65 20 66 |is is th|e same f|
|000001f0| 6f 72 6d 61 74 20 61 73 | 20 74 68 65 0d 6f 75 74 |ormat as| the.out|
|00000200| 70 75 74 20 6f 66 20 74 | 68 65 20 5c 76 65 72 62 |put of t|he \verb|
|00000210| 2b 73 69 7a 65 2b 20 66 | 75 6e 63 74 69 6f 6e 2e |+size+ f|unction.|
|00000220| 20 20 49 66 20 74 68 65 | 20 61 72 67 75 6d 65 6e | If the| argumen|
|00000230| 74 73 20 61 72 65 20 74 | 77 6f 20 73 63 61 6c 61 |ts are t|wo scala|
|00000240| 72 73 2c 0d 74 68 65 6e | 20 74 68 65 20 66 69 72 |rs,.then| the fir|
|00000250| 73 74 20 61 72 67 75 6d | 65 6e 74 20 69 73 20 74 |st argum|ent is t|
|00000260| 68 65 20 6e 75 6d 62 65 | 72 20 6f 66 20 72 6f 77 |he numbe|r of row|
|00000270| 73 2c 20 61 6e 64 20 74 | 68 65 20 73 65 63 6f 6e |s, and t|he secon|
|00000280| 64 20 61 72 67 75 6d 65 | 6e 74 0d 69 73 20 74 68 |d argume|nt.is th|
|00000290| 65 20 6e 75 6d 62 65 72 | 20 6f 66 20 63 6f 6c 75 |e number| of colu|
|000002a0| 6d 6e 73 2e 0d 0d 0d 5c | 70 61 72 61 67 72 61 70 |mns....\|paragrap|
|000002b0| 68 7b 45 78 61 6d 70 6c | 65 7d 0d 5c 69 6e 64 65 |h{Exampl|e}.\inde|
|000002c0| 78 7b 65 78 61 6d 70 6c | 65 20 6f 66 20 6f 6e 65 |x{exampl|e of one|
|000002d0| 73 28 29 7d 0d 5c 69 6e | 64 65 78 7b 6f 6e 65 73 |s()}.\in|dex{ones|
|000002e0| 28 29 21 65 78 61 6d 70 | 6c 65 7d 0d 5c 62 65 67 |()!examp|le}.\beg|
|000002f0| 69 6e 7b 76 65 72 62 61 | 74 69 6d 7d 0d 3e 20 6f |in{verba|tim}.> o|
|00000300| 6e 65 73 28 32 2c 35 29 | 0d 20 20 20 20 20 20 20 |nes(2,5)|. |
|00000310| 20 31 20 20 20 20 20 20 | 20 20 20 20 31 20 20 20 | 1 | 1 |
|00000320| 20 20 20 20 20 20 20 31 | 20 20 20 20 20 20 20 20 | 1| |
|00000330| 20 20 31 20 20 20 20 20 | 20 20 20 20 20 31 20 20 | 1 | 1 |
|00000340| 0d 20 20 20 20 20 20 20 | 20 31 20 20 20 20 20 20 |. | 1 |
|00000350| 20 20 20 20 31 20 20 20 | 20 20 20 20 20 20 20 31 | 1 | 1|
|00000360| 20 20 20 20 20 20 20 20 | 20 20 31 20 20 20 20 20 | | 1 |
|00000370| 20 20 20 20 20 31 20 20 | 0d 3e 20 6f 6e 65 73 28 | 1 |.> ones(|
|00000380| 5b 32 2c 34 5d 29 0d 20 | 20 20 20 20 20 20 20 31 |[2,4]). | 1|
|00000390| 20 20 20 20 20 20 20 20 | 20 20 31 20 20 20 20 20 | | 1 |
|000003a0| 20 20 20 20 20 31 20 20 | 20 20 20 20 20 20 20 20 | 1 | |
|000003b0| 31 20 20 0d 20 20 20 20 | 20 20 20 20 31 20 20 20 |1 . | 1 |
|000003c0| 20 20 20 20 20 20 20 31 | 20 20 20 20 20 20 20 20 | 1| |
|000003d0| 20 20 31 20 20 20 20 20 | 20 20 20 20 20 31 20 20 | 1 | 1 |
|000003e0| 0d 3e 20 64 20 3d 20 31 | 3a 33 3a 30 2e 35 3b 0d |.> d = 1|:3:0.5;.|
|000003f0| 3e 20 63 20 3d 20 31 3a | 35 3b 0d 3e 20 62 20 3d |> c = 1:|5;.> b =|
|00000400| 20 5b 63 3b 64 5d 0d 20 | 62 20 3d 0d 20 20 20 20 | [c;d]. |b =. |
|00000410| 20 20 20 20 31 20 20 20 | 20 20 20 20 20 20 20 32 | 1 | 2|
|00000420| 20 20 20 20 20 20 20 20 | 20 20 33 20 20 20 20 20 | | 3 |
|00000430| 20 20 20 20 20 34 20 20 | 20 20 20 20 20 20 20 20 | 4 | |
|00000440| 35 20 20 0d 20 20 20 20 | 20 20 20 20 31 20 20 20 |5 . | 1 |
|00000450| 20 20 20 20 20 31 2e 35 | 20 20 20 20 20 20 20 20 | 1.5| |
|00000460| 20 20 32 20 20 20 20 20 | 20 20 20 32 2e 35 20 20 | 2 | 2.5 |
|00000470| 20 20 20 20 20 20 20 20 | 33 20 20 0d 3e 20 61 20 | |3 .> a |
|00000480| 3d 20 6f 6e 65 73 28 73 | 69 7a 65 28 62 29 29 0d |= ones(s|ize(b)).|
|00000490| 20 61 20 3d 0d 20 20 20 | 20 20 20 20 20 31 20 20 | a =. | 1 |
|000004a0| 20 20 20 20 20 20 20 20 | 31 20 20 20 20 20 20 20 | |1 |
|000004b0| 20 20 20 31 20 20 20 20 | 20 20 20 20 20 20 31 20 | 1 | 1 |
|000004c0| 20 20 20 20 20 20 20 20 | 20 31 20 20 0d 20 20 20 | | 1 . |
|000004d0| 20 20 20 20 20 31 20 20 | 20 20 20 20 20 20 20 20 | 1 | |
|000004e0| 31 20 20 20 20 20 20 20 | 20 20 20 31 20 20 20 20 |1 | 1 |
|000004f0| 20 20 20 20 20 20 31 20 | 20 20 20 20 20 20 20 20 | 1 | |
|00000500| 20 31 20 20 0d 3e 20 6f | 6e 65 73 28 5b 32 2c 34 | 1 .> o|nes([2,4|
|00000510| 5d 29 0d 5c 65 6e 64 7b | 76 65 72 62 61 74 69 6d |]).\end{|verbatim|
|00000520| 7d 0d 0d 53 65 65 20 61 | 6c 73 6f 3a 20 50 61 67 |}..See a|lso: Pag|
|00000530| 65 7e 5c 70 61 67 65 72 | 65 66 7b 66 6e 3a 73 69 |e~\pager|ef{fn:si|
|00000540| 7a 65 7d 20 5c 76 65 72 | 62 2b 73 69 7a 65 28 29 |ze} \ver|b+size()|
|00000550| 2b 2c 0d 50 61 67 65 7e | 5c 70 61 67 65 72 65 66 |+,.Page~|\pageref|
|00000560| 7b 66 6e 3a 7a 65 72 6f | 73 7d 20 5c 76 65 72 62 |{fn:zero|s} \verb|
|00000570| 2b 7a 65 72 6f 73 28 29 | 2b 2e 0d 0d 5c 6e 65 77 |+zeros()|+...\new|
|00000580| 70 61 67 65 0d 0d 0d 0d | 0d |page....|. |
+--------+-------------------------+-------------------------+--------+--------+