# Time series probability and mutual information

There is a time series of say $100$ data points. I wish to assign symbols of $0, 1, 2$ for each unique data point. The issue is I have tried but got stuck since no matter I specify the symbols, the program just outputs probability of $1$'s and $0$'s. The following are the questions:

1. How to find probability or correct my code so that it outputs probablities when number of symbols size > 2?
2. How to calculate entropy annd mutual information for this case. I don't know although I have read Matlab's entropy calculation Mutual Information & Entropy but alas cannot follow how to apply in this case.