Commute-Duplicate

From NARS2000
Revision as of 17:14, 29 November 2016 by WikiSysop (talk | contribs) (Created page with "<table border="1" cellpadding="5" cellspacing="0" rules="none" summary=""> <tr> <td> <table border="0" cellpadding="5" cellspacing="0" summary=""> <tr> <td val...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
Commute: Z←f⍨ R      returns R f R.
Duplicate: Z←L f⍨ R returns R f L.
L and R are arrays.
f is a function.

For example:

      ∘.=⍨⍳4 ⍝ Identity matrix
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
      √+/2*⍨6 2⍴3 4, 5 12, 8 15, 7 24, 20 21, 12 35 ⍝ Pythagorean hypotenuses
5 13 17 25 29 37