Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function h = sumofsinusoids(Ts,P, w_max,m)
- h = zeros(1,m);
- for i = 1:m
- su = 0;
- for p= 0:P-1
- beta_p = power(sqrt(P),-1);
- psy_p = randnum();
- phi_p = randnum();
- nu_max = w_max*Ts;
- nu_p = nu_max * cos(psy_p);
- su = su + beta_p * exp(1i*2*pi*(phi_p + m*nu_p));
- end
- h(i) = su;
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement