?? matchlablist.m
字號:
%MATCHLABLIST Match entries of lablist1 with lablist2%% I = MATCHLABLIST(LABLIST1,LABLIST2)%% INPUT% LABLIST1 list of class names% LABLIST2 list of class names%% OUTPUT% I indices for LABLIST1 appearing in LABLIST2%% DESCRIPTION% Find the indices of places where the entries of LABLIST1 appear % in LABLIST2, i.e. LABLIST1 = LABLIST2(I).% Note that this operation is not symmetric, changing the order of% LABLIST1 and LABLIST2 changes I! % I(i) = 0 for labels appearing in LABLIST1 that are not in LABLIST2.%% SEE ALSO% costm, testcost% Copyright: D.M.J. Tax davidt@ph.tn.tudelft.nl% Faculty of Applied Sciences, Delft University of Technology% P.O. Box 5046, 2600 GA Delft, The Netherlandsfunction I = matchlablist(lablist1,lablist2) prtrace(mfilename);n = size(lablist1,1);I = zeros(n,1); % the resorting vectorfor i=1:n tmp = strmatch(deblank(lablist1(i,:)),lablist2,'exact'); if ~isempty(tmp) I(i) = tmp(1); else I(i) = 0; endendreturn
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -