Matrix transposition: Difference between revisions

Content added Content deleted
(+hope)
Line 666: Line 666:
return call_user_func_array('array_map', array_merge(array(NULL), $m));
return call_user_func_array('array_map', array_merge(array(NULL), $m));
}</lang>
}</lang>

=={{header|PL/I}}==
<lang PL/I>
/* Transpose matrix A, result at B. */
transpose: procedure (a, b);
declare (a, b) (*,*) float controlled;
declare (m, n) fixed binary;

if allocation(b) > 0 then free b;

m = hbound(a,1); n = hbound(a,2);

allocate b(n,m);

do i = 1 to m;
b(*,i) = a(i,*);
end;
end transpose;
</lang>


=={{header|Pop11}}==
=={{header|Pop11}}==