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

📄 diagproduct.m

📁 一个关于RBF的神经网络算法
💻 M
字号:
function d = diagProduct(X, Y)%  d = diagProduct(X, Y)%%  Outputs the diagonal of the product of X and Y.%  Faster than diag(X*Y).%%  Inputs%%    X    matrix (m-by-n)%    Y    matrix (n-by-m)%%  Output%    d    vector (m-by-1)[m,n] = size(X);[p,q] = size(Y);if m ~= q | n ~= p  error('diagProduct: bad dimensions')end% P - a column vector of the rows of XP = X';P = P(:);% Q - a column vector of the columns of YQ = Y(:);% Z - an [n,m] matrix containing the components of P.*QZ = zeros(n,m);Z(:) = P .* Q;% d - the answer is the sum of the columns of Zd = colSum(Z)';

⌨️ 快捷键说明

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