'''''arrµL½×¬O1ºû©Î2ºû,¤U¬ÉµL½×¬O0©Î1,³£¥i¥HÂà¸m¦¨2ºû¤U¬É¬O1ªºarray
''''¨ú¥Ntranspose¨ç¼Æ¤£¦A¨üªý¤_2^16¨î,¤j®a°Ñ¦Ò,§Æ±æ¤j¤jÌ«ü±Ð.
Function mytranspose(Arr)
Dim k%, x, y, Brr
k = IIf(LBound(Arr) = 0, 1, 0) ''''°Ï¤Àarr¤U¬É¬O0¬O1
On Error Resume Next
x = UBound(Arr, 2)
On Error GoTo 0
If IsEmpty(x) Then ''''''''''''''''''''''''1ºû
ReDim Brr(1 To UBound(Arr) + k, 1 To 1)
For i = 1 To UBound(Arr)
Brr(i, 1) = Arr(i - k)
Next i
Else '''''''''''''''''''''''''''''''''''''''2ºû
x = UBound(Arr, 2)
y = UBound(Arr, 1)
ReDim Brr(1 To x + k, 1 To y + k)
For i = 1 To x + k
For j = 1 To y + k
Brr(i, j) = Arr(j - k, i - k)
Next j
Next i
End If
mytranspose = Brr
End Function |