0001 function [tonalInitial, tonalFinal]=hanyu2tonalInitialFinal(hanyuSyl)
0002
0003
0004
0005
0006
0007
0008
0009
0010 qiYin={'z', 'c', 's', 'zh', 'ch', 'sh', 'k', 'h', 'd', 't', 'b', 'p', 'j', 'q', 'x', 'f', 'g'};
0011 for i=1:length(qiYin)
0012 qiYinLen(i)=length(qiYin{i});
0013 end
0014 [junk, index]=sort(-qiYinLen);
0015 qiYin=qiYin(index);
0016
0017 tonalInitial=[];
0018 tonalFinal=hanyuSyl;
0019 for i=1:length(qiYin)
0020 if strfind(hanyuSyl, qiYin{i})==1
0021 tonalInitial=qiYin{i};
0022 tonalFinal=hanyuSyl(length(qiYin{i})+1:end);
0023 break;
0024 end
0025 end