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

📄 newsynapse.m

📁 bnn神经网络
💻 M
字号:
function SynapseModel = newsynapse(ext_psp_fun , ext_psp_fun_param , int_psp_fun , int_psp_fun_param)
% NEWSYNAPSE    Create a new synapse model for Biological Neural Network (BNN)
% 
%   Version:    1.0
%   ----------------------------------
%   Amir Reza Saffari Azar, August 2004
%   amir@ymer.org
%   http://www.ymer.org
%   http://ee.sut.ac.ir/faculty/saffari/main.index

%---checking input arguments and creating with defaults
switch nargin
    case 4          % all arguments
        ext_psp_prop    = struct('ExtPSPFun' , ext_psp_fun , 'ExtPSPFunParam' , ext_psp_fun_param);
        int_psp_prop    = struct('IntPSPFun' , int_psp_fun , 'IntPSPFunParam' , int_psp_fun_param);
        
    case 3
        ext_psp_prop    = struct('ExtPSPFun' , ext_psp_fun , 'ExtPSPFunParam' , ext_psp_fun_param);
        int_psp_prop    = struct('IntPSPFun' , int_psp_fun , 'IntPSPFunParam' , 'def');
        
    case 2
        ext_psp_prop    = struct('ExtPSPFun' , ext_psp_fun , 'ExtPSPFunParam' , ext_psp_fun_param);
        int_psp_prop    = struct('IntPSPFun' , 'alpha_fun_int' , 'IntPSPFunParam' , 'def');
        
    case 1
        ext_psp_prop    = struct('ExtPSPFun' , ext_psp_fun , 'ExtPSPFunParam' , 'def');
        int_psp_prop    = struct('IntPSPFun' , 'alpha_fun_int' , 'IntPSPFunParam' , 'def');
        
    case 0
        ext_psp_prop    = struct('ExtPSPFun' , 'alpha_fun_ext' , 'ExtPSPFunParam' , 'def');
        int_psp_prop    = struct('IntPSPFun' , 'alpha_fun_int' , 'IntPSPFunParam' , 'def');
end

SynapseModel = struct('External' , ext_psp_prop , 'Internal' , int_psp_prop);

%---checking model
[CheckMessage CheckFlag]    = checksynapse(SynapseModel);
dispmessage(CheckMessage , 'text' , 'Synapse Build Status');

SynapseModel.BuildStatus.Message = CheckMessage;
SynapseModel.BuildStatus.Flag    = CheckFlag;

return

⌨️ 快捷键说明

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