home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Languages / RLaB 1.18c / manual / mean.tex < prev    next >
LaTeX Document  |  1994-04-27  |  1.3 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: mean.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 6d 65 61 6e 20 2d 2d |\section|{mean --|
|00000010| 2d 20 41 76 65 72 61 67 | 65 20 76 61 6c 75 65 7d |- Averag|e value}|
|00000020| 0d 5c 6c 61 62 65 6c 7b | 66 6e 3a 6d 65 61 6e 7d |.\label{|fn:mean}|
|00000030| 0d 5c 69 6e 64 65 78 7b | 6d 65 61 6e 28 29 7d 0d |.\index{|mean()}.|
|00000040| 5c 69 6e 64 65 78 7b 61 | 76 65 72 61 67 65 20 76 |\index{a|verage v|
|00000050| 61 6c 75 65 7d 0d 5c 69 | 6e 64 65 78 7b 6d 65 61 |alue}.\i|ndex{mea|
|00000060| 6e 7d 0d 5c 62 65 67 69 | 6e 7b 72 61 69 6c 7d 0d |n}.\begi|n{rail}.|
|00000070| 4d 65 61 6e 20 3a 20 27 | 6d 65 61 6e 27 20 27 28 |Mean : '|mean' '(|
|00000080| 27 20 4d 61 74 72 69 78 | 20 27 29 27 20 3b 0d 5c |' Matrix| ')' ;.\|
|00000090| 65 6e 64 7b 72 61 69 6c | 7d 0d 0d 5c 76 65 72 62 |end{rail|}..\verb|
|000000a0| 2b 6d 65 61 6e 2b 20 63 | 61 6c 63 75 6c 61 74 65 |+mean+ c|alculate|
|000000b0| 73 20 74 68 65 20 61 72 | 69 74 68 6d 65 74 69 63 |s the ar|ithmetic|
|000000c0| 20 6d 65 61 6e 20 6f 66 | 20 74 68 65 20 61 72 67 | mean of| the arg|
|000000d0| 75 6d 65 6e 74 2e 20 20 | 49 66 20 74 68 65 20 0d |ument. |If the .|
|000000e0| 61 72 67 75 6d 65 6e 74 | 20 69 73 20 61 20 72 6f |argument| is a ro|
|000000f0| 77 20 6f 72 20 63 6f 6c | 75 6d 6e 20 76 65 63 74 |w or col|umn vect|
|00000100| 6f 72 2c 20 74 68 65 6e | 20 74 68 65 20 6d 65 61 |or, then| the mea|
|00000110| 6e 20 6f 66 20 61 6c 6c | 20 65 6c 65 6d 65 6e 74 |n of all| element|
|00000120| 73 20 69 73 0d 72 65 74 | 75 72 6e 65 64 2c 20 20 |s is.ret|urned, |
|00000130| 4f 74 68 65 72 77 69 73 | 65 20 5c 76 65 72 62 2b |Otherwis|e \verb+|
|00000140| 6d 65 61 6e 2b 20 72 65 | 74 75 72 6e 73 20 61 20 |mean+ re|turns a |
|00000150| 72 6f 77 20 6d 61 74 72 | 69 78 20 66 6f 72 6d 65 |row matr|ix forme|
|00000160| 64 20 62 79 20 74 61 6b | 69 6e 67 0d 74 68 65 20 |d by tak|ing.the |
|00000170| 61 72 69 74 68 6d 65 74 | 69 63 20 6d 65 61 6e 20 |arithmet|ic mean |
|00000180| 6f 66 20 65 61 63 68 20 | 63 6f 6c 75 6d 6e 2e 0d |of each |column..|
|00000190| 0d 24 5c 4c 6f 6e 67 72 | 69 67 68 74 61 72 72 6f |.$\Longr|ightarro|
|000001a0| 77 24 20 54 68 69 73 20 | 69 73 20 6e 6f 74 20 61 |w$ This |is not a|
|000001b0| 6e 20 5c 52 4c 61 42 5c | 20 62 75 69 6c 74 2d 69 |n \RLaB\| built-i|
|000001c0| 6e 20 66 75 6e 63 74 69 | 6f 6e 2e 20 20 54 68 69 |n functi|on. Thi|
|000001d0| 73 20 66 75 6e 63 74 69 | 6f 6e 0d 69 73 20 6e 6f |s functi|on.is no|
|000001e0| 72 6d 61 6c 6c 79 20 6c | 6f 61 64 65 64 20 6f 6e |rmally l|oaded on|
|000001f0| 20 73 74 61 72 74 2d 75 | 70 20 66 72 6f 6d 20 74 | start-u|p from t|
|00000200| 68 65 20 5c 76 65 72 62 | 2b 6d 65 61 6e 2e 72 2b |he \verb|+mean.r+|
|00000210| 20 66 69 6c 65 20 69 6e | 20 74 68 65 0d 73 74 61 | file in| the.sta|
|00000220| 6e 64 61 72 64 20 5c 76 | 65 72 62 2b 72 6c 69 62 |ndard \v|erb+rlib|
|00000230| 2b 20 64 69 72 65 63 74 | 6f 72 79 2e 20 55 73 65 |+ direct|ory. Use|
|00000240| 20 6f 66 20 74 68 65 20 | 5c 76 65 72 62 2b 2d 72 | of the |\verb+-r|
|00000250| 2b 20 6f 70 74 69 6f 6e | 2c 20 69 6e 63 6f 72 72 |+ option|, incorr|
|00000260| 65 63 74 6c 79 20 0d 73 | 65 74 74 69 6e 67 20 74 |ectly .s|etting t|
|00000270| 68 65 20 5c 76 65 72 62 | 2b 52 4c 41 42 5f 4c 49 |he \verb|+RLAB_LI|
|00000280| 42 5f 44 49 52 2b 20 65 | 6e 76 69 72 6f 6e 6d 65 |B_DIR+ e|nvironme|
|00000290| 6e 74 61 6c 20 76 61 72 | 69 61 62 6c 65 2c 20 6f |ntal var|iable, o|
|000002a0| 72 20 6d 6f 64 69 66 79 | 69 6e 67 0d 5c 76 65 72 |r modify|ing.\ver|
|000002b0| 62 2b 6d 65 61 6e 2e 72 | 2b 20 6d 61 79 20 6d 61 |b+mean.r|+ may ma|
|000002c0| 6b 65 20 74 68 69 73 20 | 66 75 6e 63 74 69 6f 6e |ke this |function|
|000002d0| 20 75 6e 61 76 61 69 6c | 61 62 6c 65 2e 0d 0d 5c | unavail|able...\|
|000002e0| 70 61 72 61 67 72 61 70 | 68 7b 45 78 61 6d 70 6c |paragrap|h{Exampl|
|000002f0| 65 7d 0d 5c 69 6e 64 65 | 78 7b 65 78 61 6d 70 6c |e}.\inde|x{exampl|
|00000300| 65 20 6f 66 20 6d 65 61 | 6e 28 29 7d 0d 5c 69 6e |e of mea|n()}.\in|
|00000310| 64 65 78 7b 6d 65 61 6e | 28 29 21 65 78 61 6d 70 |dex{mean|()!examp|
|00000320| 6c 65 7d 0d 5c 62 65 67 | 69 6e 7b 76 65 72 62 61 |le}.\beg|in{verba|
|00000330| 74 69 6d 7d 20 0d 3e 20 | 61 20 3d 20 72 61 6e 64 |tim} .> |a = rand|
|00000340| 28 33 2c 35 29 0d 20 61 | 20 3d 0d 20 20 20 20 30 |(3,5). a| =. 0|
|00000350| 2e 35 37 32 20 20 20 20 | 20 20 30 2e 31 30 39 20 |.572 | 0.109 |
|00000360| 20 20 20 20 20 30 2e 39 | 32 39 20 20 20 20 20 20 | 0.9|29 |
|00000370| 30 2e 32 38 31 20 20 20 | 20 20 20 30 2e 34 33 36 |0.281 | 0.436|
|00000380| 20 20 0d 20 20 20 20 30 | 2e 35 37 36 20 20 20 20 | . 0|.576 |
|00000390| 20 20 30 2e 39 30 32 20 | 20 20 20 20 20 30 2e 39 | 0.902 | 0.9|
|000003a0| 33 35 20 20 20 20 20 20 | 30 2e 39 37 32 20 20 20 |35 |0.972 |
|000003b0| 20 20 20 30 2e 36 32 35 | 20 20 0d 20 20 20 20 30 | 0.625| . 0|
|000003c0| 2e 35 30 31 20 20 20 20 | 20 20 30 2e 35 36 38 20 |.501 | 0.568 |
|000003d0| 20 20 20 20 20 30 2e 37 | 37 31 20 20 20 20 20 30 | 0.7|71 0|
|000003e0| 2e 30 32 36 39 20 20 20 | 20 20 20 30 2e 34 36 39 |.0269 | 0.469|
|000003f0| 20 20 0d 3e 20 6d 65 61 | 6e 28 61 29 0d 20 20 20 | .> mea|n(a). |
|00000400| 20 20 30 2e 35 35 20 20 | 20 20 20 20 30 2e 35 32 | 0.55 | 0.52|
|00000410| 36 20 20 20 20 20 20 30 | 2e 38 37 38 20 20 20 20 |6 0|.878 |
|00000420| 20 20 30 2e 34 32 37 20 | 20 20 20 20 20 20 30 2e | 0.427 | 0.|
|00000430| 35 31 20 20 0d 3e 20 62 | 20 3d 20 61 5b 31 3b 5d |51 .> b| = a[1;]|
|00000440| 0d 20 62 20 3d 0d 20 20 | 20 20 30 2e 35 37 32 20 |. b =. | 0.572 |
|00000450| 20 20 20 20 20 30 2e 31 | 30 39 20 20 20 20 20 20 | 0.1|09 |
|00000460| 30 2e 39 32 39 20 20 20 | 20 20 20 30 2e 32 38 31 |0.929 | 0.281|
|00000470| 20 20 20 20 20 20 30 2e | 34 33 36 20 20 0d 3e 20 | 0.|436 .> |
|00000480| 6d 65 61 6e 28 62 29 0d | 20 20 20 20 30 2e 34 36 |mean(b).| 0.46|
|00000490| 35 0d 3e 20 63 20 3d 20 | 61 5b 3b 31 5d 0d 20 63 |5.> c = |a[;1]. c|
|000004a0| 20 3d 0d 20 20 20 20 30 | 2e 35 37 32 20 20 0d 20 | =. 0|.572 . |
|000004b0| 20 20 20 30 2e 35 37 36 | 20 20 0d 20 20 20 20 30 | 0.576| . 0|
|000004c0| 2e 35 30 31 20 20 0d 3e | 20 6d 65 61 6e 28 63 29 |.501 .>| mean(c)|
|000004d0| 0d 20 20 20 20 20 30 2e | 35 35 0d 5c 65 6e 64 7b |. 0.|55.\end{|
|000004e0| 76 65 72 62 61 74 69 6d | 7d 0d 0d 53 65 65 20 61 |verbatim|}..See a|
|000004f0| 6c 73 6f 3a 20 50 61 67 | 65 7e 5c 70 61 67 65 72 |lso: Pag|e~\pager|
|00000500| 65 66 7b 66 6e 3a 73 74 | 64 7d 20 5c 76 65 72 62 |ef{fn:st|d} \verb|
|00000510| 2b 73 74 64 28 29 2b 2e | 0d 0d 5c 6e 65 77 70 61 |+std()+.|..\newpa|
|00000520| 67 65 0d 0d 0d 0d 0d 0d | |ge......| |
+--------+-------------------------+-------------------------+--------+--------+