目录
1 概述
2 运行结果
3 参考文献
4 Matlab代码
本代码探索了普遍逼近定理,该定理指出,单层“人工神经元”可以用来逼近任何函数,具有任意小的逼近误差。这个项目通过视觉辅助工具提供了定理的直观证明。该项目允许用户改变不同的网络参数,以近似任意函数f(x)。
主函数部分代码:
function [varargout] = requiredToolboxes(mfiles, levels)
if nargin < 1
mfiles = 'imshow.m';
end
if nargin < 2
levels = 3;
end
% Get the first level of files
[files builtins classes] = depfun(mfiles,'-toponly','-quiet');
% Initial list of all required files
reqFiles = union(files, classes);
for i = 2:levels
[files builtins classes] = depfun(files,'-toponly','-quiet');
% Update the list of all required files
reqFiles = union(reqFiles,union(files, classes));
end
% Parse the list of required files to determine what toolboxes they are from
reqToolboxFolders = {};
for i = 1:length(reqFiles)
remain = reqFiles{i};
toolbox = '';
while true
[str, remain] = strtok(remain, filesep);
if isempty(str),
break;
end
if strcmpi(str,'toolbox')
toolbox = strtok(remain, filesep);
break;
end
end
if ~isempty(toolbox)
reqToolboxFolders = union(reqToolboxFolders,toolbox);
end
end
baseMATLABFolders = {'matlab','shared','local'};
reqAddonToolboxes = setdiff(reqToolboxFolders,baseMATLABFolders);
if nargout == 0
if ~isempty(reqAddonToolboxes)
disp('Required toolboxes:')
cellfun(@disp,reqAddonToolboxes)
else
disp('Only base MATLAB is required')
end
else
if nargout >= 1
varargout{1} = reqAddonToolboxes;
end
if nargout >= 2
varargout{2} = reqFiles;
end
end
[1]南东. RBF和MLP神经网络逼近能力的几个结果[D].大连理工大学,2007.
部分理论引用网络文献,若有侵权联系博主删除。