coef2w.m
来自「王小平《遗传算法——理论、应用与软件实现》随书光盘」· M 代码 · 共 16 行
M
16 行
function [w]=coef2w(coefs,thsize,psize)
%
% [w]=coef2w(coefs,thsize,psize)
%
% w = returned weight matrix
% coefs = GA determined coefficients
% thsize = size of this layer
% psize = size of previous layer
%
w=[];
for i = 1 : psize
w(i,:)=coefs(1,((i-1)*thsize)+1:((i-1)*thsize)+thsize);
end
w=w';
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?