Jump to content

Matrix transposition: Difference between revisions

Line 1,145:
tm <- t(m)
print(tm)</lang>
 
=={{header|RLaB}}==
<lang RLaB>
>> m = rand(3,5)
0.41844289 0.476591435 0.75054022 0.226388925 0.963880314
0.91267171 0.941762397 0.464227895 0.693482786 0.203839405
0.261512966 0.157981873 0.26582235 0.11557427 0.0442493069
>> m'
0.41844289 0.91267171 0.261512966
0.476591435 0.941762397 0.157981873
0.75054022 0.464227895 0.26582235
0.226388925 0.693482786 0.11557427
0.963880314 0.203839405 0.0442493069
 
=={{header|Ruby}}==
 
<lang ruby>m=[[1, 1, 1, 1],
[2, 4, 8, 16],
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.