mydnif.m

来自「神经网络学习过程的实例程序」· M 代码 · 共 33 行

M
33
字号
function d = mydnif(z,n)
%MYDNIF Example custom net input derivative function of MYNIF.
%
%  Use this function as a template to write your own function.
%  
%  Syntax
%
%    dN_dZ = dtansig(Z,N)
%      Z - SxQ matrix of Q weighted input (column) vectors.
%      N - SxQ matrix of Q net input (column) vectors.
%      dN_dZ - SxQ derivative dN/dZ.
%
%  Example
%
%    z1 = rand(4,5);
%    z2 = rand(4,5);
%    z3 = rand(4,5);
%    n = mynif(z1,z2,z3)
%    dn_dz1 = mydnif(z1,n)
%    dn_dz2 = mydnif(z2,n)
%    dn_dz3 = mydnif(z3,n)

% Copyright 1997 The MathWorks, Inc.
% $Revision: 1.3.2.1 $

% ** Replace the following calculation with your
% **  derivative calculation.

d = n.^2 .* z.^2;

% **  Note that you have both the net input Z in question
% **  and output N available to calculate the derivative.

⌨️ 快捷键说明

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