sort strcmp

load('fi.mat');
tkf = sort(tk);
c1 = size(bbb, 1);
c2 = size(tkf, 1);
j = 1;
mf =[];
for i=1:1:c2
  if j <= c2
    while  (strcmp(tkf{i}, [bbb{j}, '.pdb']) ~= 1)
       mf = [mf , j];
       j = j+1;
       % at this point, we should record the j position   
    end
    j=j+1;
  end
end
原文地址:https://www.cnblogs.com/greencolor/p/2097033.html