findcommon.m

来自「WAAS matlab仿真程序 maast」· M 代码 · 共 21 行

M
21
字号
function c = findcommon(a,b)%*************************************************************************%*     Copyright c 2001 The board of trustees of the Leland Stanford     *%*                      Junior University. All rights reserved.          *%*     This script file may be distributed and used freely, provided     *%*     this copyright notice is always kept with it.                     *%*                                                                       *%*     Questions and comments should be directed to Todd Walter at:      *%*     twalter@stanford.edu                                              *%*************************************************************************%% function c = findcommon(a,b)% find common elements in vectors a & b% simplified and sped up version of INTERSECT.Ma = a(:);b = b(:);[c,idx] = sort([a;b]);d = find(c(1:end-1)==c(2:end));c = c(d);

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?