Counts instances for each category for many Matlab files
You felt it right, there's a lot of unnecessary copy/paste in the first part.

Your 5 data structures are similar, and you create a lot of variables to perform the same processing 5 times.

I did a quick factorisation which brings back the code to a reasonable 12 lines (I could not test, obviously, but that seems OK):

result_list = []

for name in ["AWA","Rem","S1","S2","SWS"]:
    xx_y=sio.loadmat('/home/{}_FeaturesAll.mat'.format(name))['y'].astype('int')
    xx=np.ravel(xx)
    result_list.append(np.bincount(xx))

#Joining the 5 vectors
table= (np.vstack(result_list)).T
TABLE = np.delete(table, (0), axis=0)
print(TABLE)


As the names are logical, I don't have to make a list of full names, only a part is enough. I just apply 5 times the same operation in the correct order, then store in result_list.

Joining the vectors is now a piece of cake. Just pass the result list.

Had you needed the individual vectors further in your code, then a collections.OrderedDict would be better to store them by name and recall them afterwards.