www.gusucode.com > mbc 工具箱 matlab 源码程序 > mbc/@mbcfoundation/@action/isIdenticalAction.m
function Same = isIdenticalAction(A, AList) %ISIDENTICALACTION Check whether an action is identical to others % % SAME = ISIDENTICALACTION(A, ALIST) checks whether the command and % timing of A is identical to any actions in the array ALIST. The return % value is a logical array the same size as ALIST that contains true % values for actions that are the same command % Copyright 2005-2010 The MathWorks, Inc. Cmd = A.Command; Date = A.Date; AllCommands = get(AList, {'Command'}); AllDates = get(AList, {'Date'}); Same = false(size(AList)); for n = 1:numel(Same) Same(n) = (Date==AllDates{n}) && isequal(Cmd, AllCommands{n}); end