f1=: <: | 減一 (單邊詞);小於或等於 |
f2=: f1&9 | 小於或等於 9 |
f3=: f2 *. >:&2 | 區間檢定, 2 到 9 (包含雙邊) |
f4=: f3 *. <. = ] | 在 2 與 9 之間,且為整數 |
f5=: f3 +. <. = ] | 在 2 與 9 之間,或為整數 |
g1=: %&1.8 | 除以 1.8 |
g2=: g1^:_1 | 乘以 1.8 |
g3=: -&32 | 減 32 |
g4=: g3^:_1 | 加 32 |
g5=: g1@g3 | 華氏轉攝氏 |
g6=: g5^:_1 | 攝氏轉華氏 |
h1=: >./ | 最大值 (單邊詞) |
h2=: h1-<./ | Spread. Try h2 b with parabola: b=:(-&2 * -&3) -:i.12 |
h3=: h1@]-i.@[*h2@]%<:@[ | Grid. Try 10 h3 b |
h4=: h3 <:/ ] | Barchart. Try 10 h4 b |
h5=: {&' *' @ h4 | Barchart. Try 10 h5 b |
練習
12.1 | se exercises are grouped by topic與organized
like section, with programs that are first to be read
and n to be rewritten. However, a reader already familiar
with a given topic might begin by writing. A. Properties of numbers
B. 座標幾何 Do experiments on 向量 (or point) p=: 3 4 and triangle represented by 表格 tri=: 3 2$ 3 4 6 5 7 2
|