资源简介
将mapminmax.m和boiler_process.m两个函数同时拷贝到matlab安装目录下的toolbox下的同一个目录下即可使用。
代码片段和文件信息
% PROCESS FUNCTION BOILERPLATE CODE
% Copyright 2005-2007 The MathWorks Inc.
% TODO - Add size checking for X and Y
if (nargin < 1) error(‘NNET:Arguments‘‘Not enough arguments.‘); end
if isstr(in1)
switch lower(in1)
case ‘name‘
if nargin > 1 error(‘NNET:Arguments‘‘Too many input arguments for ‘‘name‘‘ action‘) end
if (nargout > 1) error(‘NNET:Arguments‘‘Too many output arguments for ‘‘name‘‘ action‘) end
out1 = name;
case ‘pdefaults‘
if nargin > 2 error(‘NNET:Arguments‘‘Too many input arguments for ‘‘pdefaults‘‘ action‘) end
if nargin < 2 in2 = {}; end
if (nargout > 1) error(‘NNET:Arguments‘‘Too many output arguments for ‘‘pdefaults‘‘ action‘) end
out1 = param_defaults(in2);
case ‘pnames‘
if nargin > 1 error(‘NNET:Arguments‘‘Too many input arguments for ‘‘pnames‘‘ action‘) end
if (nargout > 1) error(‘NNET:Arguments‘‘Too many output arguments for ‘‘pnames‘‘ action‘) end
out1 = param_names;
case ‘pcheck‘
if (nargin < 2) error(‘NNET:Arguments‘‘Not enough input arguments for ‘‘pcheck‘‘ action‘) end
if nargin > 2 error(‘NNET:Arguments‘‘Too many input arguments for ‘‘pcheck‘‘ action‘) end
if (nargout > 1) error(‘NNET:Arguments‘‘Too many output arguments for ‘‘pcheck‘‘ action‘) end
if ~isa(in2‘struct‘) error(‘NNET:Arguments‘‘Parameters are not a struct.‘); end
names1 = fieldnames(param_defaults({}));
names2 = fieldnames(in2);
if length(names1) ~= length(names2) error(‘NNET:Arguments‘‘Incorrect number of parameters.‘); end
names1 = sort(names1);
names2 = sort(names2);
for i=1:length(names1)
if ~strcmp(names1{i}names2{i}) error(‘NNET:Arguments‘[‘Parameter field name is not correct:‘ names2{i}]); end
end
out1 = param_check(in2);
if (nargout == 0) && ~isempty(out1)
error(‘NNET:Arguments‘out1);
end
case ‘apply‘
if (nargin < 3) error(‘NNET:Arguments‘‘Not enough input arguments for ‘‘apply‘‘ action.‘); end
if (nargin > 3) error(‘NNET:Arguments‘‘Too many input arguments for ‘‘apply‘‘ action‘) end
if (nargout > 1) error(‘NNET:Arguments‘‘Too many output arguments for ‘‘apply‘‘ action‘) end
c = iscell(in2);
if c
if (size(in21) ~= 1)
error(‘NNET:Arguments‘‘Cell array X must have only one row‘)
end
cols = size(in22);
colSizes = zeros(1cols);
for i=1:cols
colSizes(i) = size(in2{1i}2);
end
in2 = cell2mat(in2);
elseif ~isa(in2‘double‘)
error(‘NNET:Arguments‘‘X must be a matrix or a row cell array‘)
end
out1 = apply_process(in2in3);
if c
out1 = mat2cell(out1size(out11)colSizes);
end
case ‘reverse‘
if (nargin < 3) error(‘NNET:Arguments‘‘Not enough input arguments for ‘‘reverse‘‘ action.‘); end
if (nargin > 3) error(‘NNET:Arguments‘‘Too many input arguments for ‘‘reverse‘‘ action‘) end
if (nargout > 1) error(‘NNET:Arguments‘‘Too many output arguments for ‘‘reverse‘‘ action‘) end
c = iscell(in2);
if c
if (size(in21) ~= 1)
error(‘NNET:Arguments‘‘Cell array X must have only one row‘)
end
cols = size(in22);
colSizes = zeros(1cols
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 5131 2014-07-21 11:04 mapminmax\boiler_process.m
文件 4660 2014-07-21 11:04 mapminmax\mapminmax.m
目录 0 2014-07-21 11:12 mapminmax
----------- --------- ---------- ----- ----
9791 3
- 上一篇:雷达信号处理+Matlab程序
- 下一篇:CT图像重建的MATLAB代码
评论
共有 条评论