argmin function for communication system

7 visualizzazioni (ultimi 30 giorni)
Jose Iglesias
Jose Iglesias il 6 Apr 2023
Modificato: Torsten il 6 Apr 2023
I can use assistance implementing a minimum distance decoder with Matlab to estimate the transmitted symbol as from the computed received signal which is y = h * x + w. The decoder estimates the transmitted symbol as . So, this is where the function attains its minimal value, which in this case is the minimum distance of the transmitted symbol. I am not certain how to implement this into Matlab. I included my current Matlab code shown below which creates 1e4 independent realizations each of h, x, and w for the input-output model y = h · x + w, and so what I need assistance with is the Matlab code for the 1e4 realizations of the decoder. I did find an argmin function from the Mathworks forum which I included at the very bottom of my Matlab code and ran it and I get a result but I am not certain if this is correct. Any assistance is greatly appreciated. Thank you in advance!
% random transmitted symbol x generations
N = 1e4;
c_vals = [-2-2*1i, -2+2*1i, 2-2*1i,2+2*1i];
idx = randi(4,N,1);
x = c_vals(idx)'
% channel h generations
N = 1e4
h = 1/sqrt(2) * (randn(N,1) + 1i*randn(N,1))
mean(h)
var(h)
% noise generations
numRealizations = 1e4; % number of independent realizations
sigma2_w = 0.1; % noise variance
w = sqrt(sigma2_w/2)*(randn(numRealizations, 1) + 1j*randn(numRealizations, 1))
y = h.*x + w
X = argmin(abs(y-h.*x).^2)
function [I,M]=argmin(varargin)
[M,I] = min(varargin{:});
end
  4 Commenti
Jose Iglesias
Jose Iglesias il 6 Apr 2023
Thanks. I will try your method.

Accedi per commentare.

Risposte (0)

Prodotti


Release

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by