|
From: | Elias Mårtenson |
Subject: | Re: [Bug-apl] Simple division question |
Date: | Fri, 20 May 2016 11:12:40 +0800 |
DaveThanks,but scalar ÷ matrix got no "expected" result and error... why?matrix ÷ scalar is OK too,are all expected result.scalar × matrixmatrix × scalarOne higher rank to matrix,are all expected result. ( as scalar duplicate to same shape as vector )scalar × or ÷ vectorHi,vector × or ÷ scalar
~~~~~~~~
2 × 3 4
6 8
3 4 × 2
6 8
2 ÷ 3 4
0.6666666667 0.5
3 4 ÷ 2
1.5 2
m ← 3 3⍴1,3⍴0
m
1 0 0
0 1 0
0 0 1
m × 2
2 0 0
0 2 0
0 0 2
2 × m
2 0 0
0 2 0
0 0 2
m ÷ 2
0.5 0 0
0 0.5 0
0 0 0.5
2 ÷ m
DOMAIN ERROR
2÷m
^ ^
[Prev in Thread] | Current Thread | [Next in Thread] |