So, I have a large matrix (4091252x2) that looks something like this:
439105 1053224 439105 1696241 439105 580064 439105 1464748 1836139 1593258 1464748 439105 1464748 1053224 1464748 1696241 1464748 580064 580064 439105
Basically, the matrix represents calls made from one person to another, represented by personID (439105 calls 1053224). What I want to do is reduce the scale of this matrix so that the smallest personID = 1 and 2 for the next lower identifier person, 3 for the next lower identifier personID after this, etc. For example, if the matrix looked like this:
110 503 402 110 300 900 300 402 402 110
I would like it to display:
1 4 3 1 2 5 2 3 3 1
The problem is that I am new to Matlab and I have no idea how to do this. I looked through reshape and sub2ind , but I really don't think this is what I am in search of. How to do it in Matlab?
Any help would be greatly appreciated, thanks!
mapping matrix matlab
ocean800
source share