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

📄 closest.m

📁 OFDM信道估计和均衡的仿真程序
💻 M
字号:
%+----------------------------------------------------------------+
%|                                                                |
%|  Name: closest.m                                               |
%|  Author: Mathew Liu, James Shen                                |
%|  Description: Takes in a QAM alphabet and a noisy_symbol and   |
%|  finds the closest match on the constellation. It also returns |
%|  the index of it inside the QAM alphabet array.                |
%|                                                                |
%+----------------------------------------------------------------+
function[out_symbol, index] = closest(QAM_alpha, noise_symbol)

for i=1:length(QAM_alpha)
   dist(i) = abs(QAM_alpha(i) - noise_symbol);
end

[val,index] = min(dist);

out_symbol = QAM_alpha(index);

%====================== End File =================================

⌨️ 快捷键说明

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