r1 = {'BJ','TJ','HE','SX','SD','NM','LN','JL','HL','SH','JS','ZJ','AH','FJ','HA','HB','HN','JX','SC','CQ','SN','GS','QH','NX','XJ','GD','GX','YN','GZ','HI'};
r1_full = {'Beijing','Tianjin','Hebei','Shanxi','Shandong','Inner Mongolia','Liaoning','Jilin','Heilongjiang','Shanghai','Jiangsu','Zhejiang','Anhui','Fujian','Henan','Hubei','Hunan','Jiangxi','Sichuan','Chongqing','Shaanxi','Gansu','Qinghai','Ningxia','Xinjiang','Guangdong','Guangxi','Yunnan','Guizhou','Hainan'};

r2 ={'BJ','TJ','HE','LN','SH','JS','ZJ','FJ','SD','GD','HI','SX','NM','JL','HL','AH','JX','HA','HB','HN','GX','CQ','SC','GZ','YN','SN','GS','QH','NX','XJ'};
r2_full = {'Beijing','Tianjin','Hebei','Liaoning','Shanghai','Jiangsu','Zhejiang','Fujian','Shandong','Guangdong','Hainan','Shanxi','Inner Mongolia','Jilin','Heilongjiang','Anhui','Jiangxi','Henan','Hubei','Hunan','Guangxi','Chongqing','Sichuan','Guizhou','Yunnan','Shaanxi','Gansu','Qinghai','Ningxia','Xinjiang',};

[~, r1_to_r2] = ismember(r2,r1);
% r2_recover = r1(r1_to_r2);
% isequal(r2, r2_recover)

[~, r2_to_r1] = ismember(r1,r2);
% r1_recover = r2(r2_to_r1);
% isequal(r1, r1_recover)

g = {'AGR', 'COL', 'CRU', 'GAS', 'OMN', 'OIL', 'EIS', 'MAN', 'ELE', 'WTR', 'CON', 'TRN', 'SER', 'c', 'g', 'i'};