File_1 = [1
1
1
1
1
1
2
2
2
2
2
2
2
3
3
3
3
3
3];
File_2 = [1 10
2 20
3 30];
Out = accumarray(File_1, File_1, [], @(x){File_2(x,:)})
Result = cell2mat(Out)
disp(Result)
Out{1}
Out{2}
Out{3}
.