Transpose an arbitrarily sized rectangular Matrix.




arraybase 1
dim matriz= {{78,19,30,12,36}, {49,10,65,42,50}, {30,93,24,78,10}, {39,68,27,64,29}}
dim mtranspuesta(matriz[,?], matriz[?,])
 
for fila = 1 to matriz[?,]
    for columna = 1 to matriz[,?]
		print matriz[fila, columna]; " ";
		mtranspuesta[columna, fila] = matriz[fila, columna]
	next columna
	print
next fila
print
 
for fila = 1 to mtranspuesta[?,]
    for columna = 1 to mtranspuesta[,?]
		print mtranspuesta[fila, columna]; " ";
    next columna
	print
next fila
end