📄 pi2m1.m
字号:
function M = pi2m1(Pi,s,Lmax,k)% function M = pi2m1(Pi,s,Lmax,k)% The Koetter-Vardy algorithm A for mapping from a % reliability matrix Pi to a multiplicity matrix M% with a total number of s interpolation points% Copyright 2004 by Todd K. Moon% Permission is granted to use this program/data% for educational/research onlyif(nargin==3) error('if Lmax is specified, k must be also');endif(nargin==4) lspec = 1;else lspec = 0;endPistar = Pi;M = zeros(size(Pi));Cost = 0;for i=1:s [p,istar] = max(Pistar(:)); Pistar(istar) = Pi(istar)/(M(istar)+2); m = M(istar)+1; if(lspec) % see if we want to include this if( sqrt(2*(Cost+m)/(k-1)) > Lmax) % enough -- stop break; end end M(istar) = m; Cost = Cost + M(istar); degbound = sqrt(2*Cost/(k-1))endCost
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -