outsideconvex.m
来自「code of an ADC implementation woith matl」· M 代码 · 共 19 行
M
19 行
function i=outsideConvex(x,n,o,tol) % function i=outsideConvex(x,n,o,tol<0>). Determine which points are outside% the convex object described by n'*x+o<=0. Positive tol reduces the number% of outside points.if nargin<4 tol=0;endif( size(x,2)*size(n,2) < 1e5 ) i = sign(sum(n'*x + o(ones(size(x,2),1),:)' >tol));else % Matrices are too big. Break into chunks chunk = round(1e5/size(n,2)); i = zeros(1,size(x,2)); for j=1:chunk:size(x,2) j2 = min(j+chunk-1,size(x,2)); i(j:j2) = sign(sum(n'*x(:,j:j2) + o(ones(j2-j+1,1),:)' >tol)); endend
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?