?? dist1.m
字號:
function D = dist1(x,t);% dist1 : calculate a nt*nx vector containing distances between all points% in x and all points in t. x and t must be row vectors !% Used in sqrDist% D = dist1(x,t)% x,t - row vectors% D - the nt*nx result% Copyright (c) 1995-2001 Frank Dellaert% All rights Reservedglobal dist1_warningif isempty(dist1_warning) warning('dist1: please compile mex-version by typing "mex dist1.c" in "clusters" directory'); dist1_warning=1;end[dx,nx] = size(x);[dt,nt] = size(t);if (dx~=1 | dt~=1), error('dist1 only takes row vectors'); end% totally vectorized (but memory hungry)D = x(ones(1,nt),:) - t(ones(1,nx),:)';
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -