⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qsubset.m

📁 机器人控制仿真程序一书的所有源代码
💻 M
字号:
function sub = qsubset(x,y)
% QSUBSET Intersection of two vectors. (Utility Function)
%         QSUBSET determines intersection of two vectors and then returns
%         the locations of these intersections.

% Author: Craig Borghesani
% 9/6/93
% Copyright (c) 1995-98 by The MathWorks, Inc.
%       $Revision: 1.4 $

% making sure to put into row format...just for the hell of it.
x=x(:)'; y=y(:)';

if ~length(x),
 x=y;
end

if length(x)~=length(y),
 for k=1:length(x),
  s=find(x(k)==y);
  if ~length(s), error('Mismatch between w and wbd');
  else sub(k)=s(1); end
 end
else sub=1:length(x); end

⌨️ 快捷键说明

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