Reorganization of data in matrix
Hi
I need to reorganize some data. Its seems like a simple problem but I never seem to end up with the right solution!
I have matrix like this. The first column is the group (all the sames are in the same group, hence all are '1'). The second column denotes all the observations from the same sample. So, the sample one has 4 observations, same for sample two same for sample four, sample five had 3 observations.
1 1 0.270588872500870
1 1 0.191034400222846
1 1 0.316821350897659
1 1 0.391794699189989
1 2 0.290746129652351
1 2 0.329669792655481
1 2 0.320279988895299
1 2 0.296043180762110
1 4 0.334951618712500
1 4 0.212164936092998
1 4 0.338920673290546
1 4 0.374281296411533
1 5 0.363666308502410
1 5 0.291735460896171
1 5 0.388343803429984
I want to reorganise this so that each sample is then in its own column, as per below.
0.270589 0.290746 0.334952 0.363666
0.191034 0.32967 0.212165 0.291735
0.316821 0.32028 0.338921 0.388344
0.391795 0.296043 0.374281
It seems a simple problem but I seem to have hit a brick wall!
Thanks
0 个评论
采纳的回答
更多回答(1 个)
3 个评论
另请参阅
类别
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!