haha... I need go back to elementary school. Thanks, David
On Thu, May 19, 2016 at 11:12 PM, Elias Mårtenson <[email protected]> wrote: > This is because 2÷m will result in division by zero. You can see > that 2÷1+m works fine, since that prevents any zeros in the divisor. > > Regards, > Elias > > On 20 May 2016 at 11:07, David Tran <[email protected]> wrote: > >> Hi, >> >> vector × or ÷ scalar >> scalar × or ÷ vector >> are all expected result. ( as scalar duplicate to same shape as vector ) >> >> One higher rank to matrix, >> matrix × scalar >> scalar × matrix >> are all expected result. >> >> matrix ÷ scalar is OK too, >> but scalar ÷ matrix got no "expected" result and error... why? >> >> ~~~~~~~~ >> >> 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 >> ^ ^ >> >> >> Thanks, >> Dave >> >> >
