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

📄 brmet.asv

📁 此程序完成MIMO各个自程序的功能
💻 ASV
字号:
function metric = brmet(sig,q_test,ch_coefs);%BRMET User defined branch metric.%   RHO = BRMET(R,Q,ALPHA) evaluates branch metric and returns the%   result as a column vector for all testing channel symbols Q. The%   entries of RHO variable correspond to the squared Euclidean distance%   of received signal R and testing channel symbols Q. ALPHA simply%   contains the complex path fadings of the MIMO channel.%%   See also DETECT, CHANNEL.%   Copyright 2001-2003 Kamil Anis, anisk@feld.cvut.cz%   Dept. of Radioelectronics, %   Faculty of Electrical Engineering%   Czech Technical University in Prague%   $Revision: 2.1 $  $Date: 2003/1/16 17:33:28 $%   --%   <additional stuff goes here>[m,n] = size(ch_coefs);[q_dim,foo] = size(q_test);sig = repmat(sig,q_dim,1);%function repmat,for example%>> magic(2)%ans =%    1     3%    4     2%>> repmat(magic(2), 2, 3)%ans =%    1     3     1     3     1     3%    4     2     4     2     4     2%    1     3     1     3     1     3%    4     2     4     2     4     2outsum = 0;for j=1:m % outer sum  insum = 0;  	for i=1:n % inner sum      insum1 = ch_coefs(i,j) .* q_test(:,i);      insum = insum + insum1;	end    outsum1 = abs(sig(:,j) - insum) .^ 2;  outsum = outsum + outsum1;end  metric = outsum;

⌨️ 快捷键说明

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