Currently i have a cell array containing a batch ID in de 1st column, and a position in the 2nd column. An example is shown below.
Batch Pos001 1001 3001 8002 1003 5003 8007 2007 4007 7007 8011 6013 2014 1014 3014 5014 6
What I am trying to achieve is to have only 1 row per batch ID, and convert the pos to seperate column with either True or 1. The pos will always be a number between 1 and 8.
Batch Pos 1 Pos 2 Pos 3 Pos 4 Pos 5 Pos 6 Pos 7 Pos 8001 TRUE TRUE TRUE002 TRUE 003 TRUE TRUE007 TRUE TRUE TRUE TRUE011 TRUE 013 TRUE 014 TRUE TRUE TRUE TRUE
Can anyone help me in the right direction how to achieve this, since i am really struggling with this.
Best Answer