Although many aspects of a phrase may be illustrated by applying it to scalar arguments or arrays of successive integers, more thorough explorations require the use of several classes of arrays, including negative, fractional, complex, alphabetic, and boxed. Moreover, the use of only systematic arguments such as i. 6 and i. 2 3 4 might suggest that a phrase possesses properties that it does not when applied to a random array such as ?. 2 3 4$10. The phrases of this section provide a variety of specimen arrays. Because they will be used in illustrating the application of phrases in many different sections, they should perhaps be loaded into the special z locale, so as to be generally available, either in the form d0_z_ or d0:
Random arrays can be produced by expressions of the form ? 2 3 4$10, but for repeatable experiments it is necessary to use a specific random seed, as provided by the function ?., and in any other phrase that uses it. For example: |
(QA&'A' ; QA&'a' ; QA&'+') 2 3 4 +--------------+ ¦DTLN¦dtln¦.>68¦ ¦FBRR¦fbrr¦0,<<¦ ¦YJNV¦yjnv¦C48@¦ ¦ ¦ ¦ ¦ ¦ABNR¦abnr¦+,8<¦ ¦AJBK¦ajbk¦+4,5¦ ¦RPYW¦rpyw¦<:CA¦ +--------------+
The following phrases may be applied to box an argument, to scale and shift it to a specified range, or to normalize it to the range 0 to 1:
|
B0 B1 2 3 4 QA 'A' +--------------------+ �+----+�+----+�+----+� ��DTLN���FBRR���YJNV�� �+----+�+----+�+----+� +------+------+------� �+----+�+----+�+----+� ��ABNR���AJBK���RPYW�� �+----+�+----+�+----+� +--------------------+ B2 3 4 5 QA 'a' +-----------------+ �dtlnf�rpywn�zstqb� �brryj�crksx�qxhlt� �nvabn�tgbti�mghje� �rajbk�qtzjg�mxxbx� +-----------------+ (] ; NR ; SZ ; NM) 3 4 QN 10 +--------------------------------------------------+ �_4 2 _1 0�1.6 0.4 0.1 0�1 7 4 5�0.1 0.7 0.4 0.5� �_3 _5 1 1�0.9 2.5 0.1 0.1�2 0 6 6�0.2 0 0.6 0.6� � 4 _2 0 3�1.6 0.4 0 0.9�9 3 5 8�0.9 0.3 0.5 0.8� +--------------------------------------------------+ ] Scale range to 1 Shift to 0 min Norm pos and range