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