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

📄 isset.m

📁 JLAB is a set of Matlab functions I have written or co-written over the past fifteen years for the p
💻 M
字号:
function[b]=isset(x)%ISSET  Tests whether an input array is a set.%  %   ISSET(X) returns true if no elements of X are repeated, or %   if X is empty or a scalar, and zero otherwise.%   _________________________________________________________________%   This is part of JLAB --- type 'help jlab' for more information %   (C) 2003, 2004 J.M. Lilly --- type 'help jlab_license' for details  x=x(:);  if ~isempty(x)      x=row2col(x);  x2=osum(x,-x);    %Outer sum should have all zeros along the diagonal and  %nowhere else.      b=all(diag(x2)==0) && (length(find(x2==0))==length(x));else  %True for the empty set.  b=1;end

⌨️ 快捷键说明

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