I have two cell arrays: countryname and export.
There is only one column in countryname, which is the code of the names of countries:
USACHNABW
There are two columns in export:
USA ABWUSA CHNCHN USAABW USA
Each pair (X,Y) in a row of export means "country X has relation with country Y". The size of countryname has been simplified to 3. How can I achieve the following?
Create a square 3 by 3 (in general n by n, where n is the size of countryname) matrix M such that
M(i,j)=1 if country i has relation with country j M(i,j)=0 otherwise.
Here the countrynames are relabeled as positive intergers.
Best Answer