I have the following tab-separated txt file:
User Item Rate
1 1 9
1 2 8
2 2 7
3 1 6
3 2 8
3 3 5
I import this to Matlab using tdfread which puts each column above in a corresponding variable of one struct (e.g., struct.user, struct.item, struct.rate). From there, I would like to build the matrix below without the use of loops:
9 8 NaN
NaN 7 NaN
6 8 5
Where each row represents one of the users above (from 1 to 3) and each column represents one of the items. Is this possible?
Thanks,