Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- % Data: ID, Index, Weight, Category
- A0=[1 1121 204 1;...
- 2 2212 112 1;...
- 3 2212 483 3;...
- 4 4334 233 1;...
- 5 4334 359 2;...
- 6 4334 122 3 ];
- % Current Result
- A1=pivottable(A0,[2],[],[3],{@max}); % Pivot Table
- A1=cell2mat(A1); % Convert to array
- >>A1=[1121 204;...
- 2212 483;...
- 4334 359 ]
- % Required Result
- >>A0=[1 1121 204 1;...
- 3 2212 483 3;...
- 5 4334 359 2 ];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement