Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- clear all;close all;clc
- M = 1;
- d = 2;
- p = 10;
- numIter = 1000000;
- %% -------------------- Problem 1: First option (l != k) ----------------------
- simulated = 0;
- for iter = 1:1:numIter
- h= (sqrt(d))*(1/sqrt(2))*complex(randn(M,1),randn(M,1));
- w = (sqrt(1/p))*(1/sqrt(2))*complex(randn(M,1),randn(M,1));
- num = (h'*(h*h')*h);
- den = (h + w)'*(h + w);
- simulated = simulated + real(num/den);
- end
- simulated = simulated/numIter;
Advertisement
Add Comment
Please, Sign In to add comment