To accomplish with powershell
:
Original | Transposed |
---|---|
0 1 2 3 |
0 a # |
how can a magic number be used (some regex in practice) where each original row has a variable number of columns so that only when the keyword occurs does that initiate a transpose?
Assuming that the original matrix is n
x2
so something like:
a 1
b 2
c 3
d 4
a 5
d 6
a 7
b 8
c 9
The resulting matrix may very well be sparse, but each occurrence of a
would signify a new column of output.