refactor: 项目目录结构重组
- 中文目录名改为英文:cDNA图像处理实例→examples,参考资料→references - web→app(Flask应用标准命名) - 输出目录平移到 data/output/simple/ 和 data/output/full/ - 输入图像统一到 data/input/ - 构建脚本移到 scripts/ - 源码文件改用 snake_case 命名 - 更新所有文件路径引用和文档
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
function [x,y]=limits(a)
|
||||
% LIMITS returns min & max values of matrix; else scalar value.
|
||||
%
|
||||
% [lo,hi]=LIMITS(a) returns LOw and HIgh values respectively.
|
||||
%
|
||||
% lim=LIMITS(a) returns 1x2 result, where lim = [lo hi] values
|
||||
|
||||
% Copyright 2004-2010 RBemis The MathWorks, Inc.
|
||||
|
||||
if nargin~=1 | nargout>2 %bogus syntax
|
||||
error('usage: [lo,hi]=limits(a)')
|
||||
end
|
||||
|
||||
siz=size(a);
|
||||
|
||||
if prod(siz)==1 %scalar
|
||||
result=a; % value
|
||||
else %matrix
|
||||
result=[min(a(:)) max(a(:))]; % limits
|
||||
end
|
||||
|
||||
if nargout==1 %composite result
|
||||
x=result; % 1x2 vector
|
||||
elseif nargout==2 %separate results
|
||||
x=result(1); % two scalars
|
||||
y=result(2);
|
||||
else %no result
|
||||
ans=result % display answer
|
||||
end
|
||||
Reference in New Issue
Block a user