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

📄 invperm.m

📁 物流分析工具包。Facility location: Continuous minisum facility location, alternate location-allocation (ALA)
💻 M
字号:
function inva = invperm(a)
%INVPERM Inverse permutation.
%  inva = invperm(a)
%     a = permutation vector of the integers 1 to length(a)
%
% See also RANDPERM

% Copyright (c) 1994-2006 by Michael G. Kay
% Matlog Version 9 13-Jan-2006 (http://www.ie.ncsu.edu/kay/matlog)

% Input Error Checking ****************************************************
if any(sort(a(:)') ~= 1:length(a(:)))
   error('Input argument not a permutation vector.')
end
% End (Input Error Checking) **********************************************

inva(a) = 1:length(a);
inva = reshape(inva,size(a));

⌨️ 快捷键说明

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