Matrix transposition: Difference between revisions

m
mNo edit summary
Line 316:
/* transpose */
TA=0,{nCols,nRows} nan array(TA)
for (i=1;j=1, {i} lethan (nRows), ++i;++j)
[i,ji:end]get(A), [ji:end,i]put(TA)
[i:end,ji]get(A), [ji,i:end]put(TA)
next
{"ARRAY TRANSPOSE:\n",TA}println
Line 363:
 
</pre>
 
=={{header|APL}}==
If M is a matrix, ⍉M is its transpose. For example,
543

edits