APL (Dyalog Classic), (削除) 19 (削除ここまで) (削除) 16 (削除ここまで) (削除) 15 (削除ここまで) 13 bytes
-1 byte thanks to @ErikTheOutgolfer
(⎕IO←0)
×ばつ≡(∧=⌊)/ ̈∘⍳∘⍴
-2 bytes thanks to @ngn and @H.PWiz ##How?
How?
(2D input matrix S)
×ばつ≡Check whether S is positive only on ...(∧=⌊... the diagonals or the top row and left column ...)/ ̈∘⍳∘⍴... of S.
APL (Dyalog Classic), (削除) 19 (削除ここまで) (削除) 16 (削除ここまで) (削除) 15 (削除ここまで) 13 bytes
-1 byte thanks to @ErikTheOutgolfer
(⎕IO←0)
×ばつ≡(∧=⌊)/ ̈∘⍳∘⍴
-2 bytes thanks to @ngn and @H.PWiz ##How?
(2D input matrix S)
×ばつ≡Check whether S is positive only on ...(∧=⌊... the diagonals or the top row and left column ...)/ ̈∘⍳∘⍴... of S.
APL (Dyalog Classic), (削除) 19 (削除ここまで) (削除) 16 (削除ここまで) (削除) 15 (削除ここまで) 13 bytes
-1 byte thanks to @ErikTheOutgolfer
(⎕IO←0)
×ばつ≡(∧=⌊)/ ̈∘⍳∘⍴
-2 bytes thanks to @ngn and @H.PWiz
How?
(2D input matrix S)
×ばつ≡Check whether S is positive only on ...(∧=⌊... the diagonals or the top row and left column ...)/ ̈∘⍳∘⍴... of S.
APL (Dyalog Classic), (削除) 19 (削除ここまで) (削除) 16 (削除ここまで) (削除) 15 (削除ここまで) 13 bytes
-1 byte thanks to @ErikTheOutgolfer
(⎕IO←0)
×ばつ≡(∧=⌊)/ ̈∘⍳∘⍴
-2 bytes thanks to @ngn and @H.PWiz ##How?
(2D input matrix S)
×ばつ≡Check whether S is positive only on ...(∧=⌊... the diagonals or the top row and left column ...)/ ̈∘⍳∘⍴... of S.
APL (Dyalog Classic), (削除) 19 (削除ここまで) (削除) 16 (削除ここまで) (削除) 15 (削除ここまで) 13 bytes
-1 byte thanks to @ErikTheOutgolfer
(⎕IO←0)
×ばつ≡(∧=⌊)/ ̈∘⍳∘⍴
-2 bytes thanks to @ngn and @H.PWiz ##How?
(2D input matrix S)
×ばつ≡Check whether S is positive only on ...(∧=⌊... the diagonals or the top row and left column ...) ̈∘⍳∘⍴... of S.
APL (Dyalog Classic), (削除) 19 (削除ここまで) (削除) 16 (削除ここまで) (削除) 15 (削除ここまで) 13 bytes
-1 byte thanks to @ErikTheOutgolfer
(⎕IO←0)
×ばつ≡(∧=⌊)/ ̈∘⍳∘⍴
-2 bytes thanks to @ngn and @H.PWiz ##How?
(2D input matrix S)
×ばつ≡Check whether S is positive only on ...(∧=⌊... the diagonals or the top row and left column ...)/ ̈∘⍳∘⍴... of S.
APL (Dyalog Classic), (削除) 19 (削除ここまで) (削除) 16 (削除ここまで) 15(削除) 15 (削除ここまで) 13 bytes
-1 byte thanks to @ErikTheOutgolfer
(⎕IO←0)
×ばつ≡(=/∨1∊⊢∧=⌊)/ ̈∘⍳∘⍴
##How-2 bytes thanks to @ngn and @H.PWiz ##How?
(2D input matrix S)
×ばつ≡Check whether S is positive only on ...(=/∧=⌊... the diagonals ...∨1∊⊢... or the top row and left column ...) ̈∘⍳∘⍴... of S.
APL (Dyalog Classic), (削除) 19 (削除ここまで) (削除) 16 (削除ここまで) 15 bytes
-1 byte thanks to @ErikTheOutgolfer
×ばつ≡(=/∨1∊⊢) ̈∘⍳∘⍴
##How?
(2D input matrix S)
×ばつ≡Check whether S is positive only on ...(=/... the diagonals ...∨1∊⊢... or the top row and left column ...) ̈∘⍳∘⍴... of S.
APL (Dyalog Classic), (削除) 19 (削除ここまで) (削除) 16 (削除ここまで) (削除) 15 (削除ここまで) 13 bytes
-1 byte thanks to @ErikTheOutgolfer
(⎕IO←0)
×ばつ≡(∧=⌊)/ ̈∘⍳∘⍴
-2 bytes thanks to @ngn and @H.PWiz ##How?
(2D input matrix S)
×ばつ≡Check whether S is positive only on ...(∧=⌊... the diagonals or the top row and left column ...) ̈∘⍳∘⍴... of S.