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

📄 expandd.m

📁 模式识别工具箱,本人毕业论文时用到的,希望对大家有用!
💻 M
字号:
%EXPANDD Expand integer vector to matrix occurance table% % 	A = expandd(x,m)% % The vector x containing just integers > 0 (e.g. numeric labels % obtained from renumlab) is expanded to a matrix A with size % (length(x),m) such that A(i,j) = 1 if x(i) = j and A(i,j) = 0 if % x(i) = j.% % As a result sum(A) is a frequency table of j in x. max(A) is a 0-1 % vector indicating the occurance of some j in x. find(max(A)) gives % all j that occur in x.% % See also renumlab% Copyright: R.P.W. Duin, duin@ph.tn.tudelft.nl% Faculty of Applied Physics, Delft University of Technology% P.O. Box 5046, 2600 GA Delft, The Netherlandsfunction a = expandd(x,m)x = x(:);n = length(x);if nargin == 1, m = max(x); enda = (x(:,ones(1,m)) == ones(n,1) * linspace(1,m,m));return

⌨️ 快捷键说明

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