Help needed in Matlab implementation

Status
Not open for further replies.

tejap

Newbie level 1
Joined
Feb 4, 2011
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,289
Hi all,

I am trying to implement a frequency hopping signal in MATLAB, and have a doubt about the following code:

N = 20;
Nf = 200;
Tvar = N;
alpha = rand(N, Nf);
t = linspace(0,1,Tvar);

p = zeros(Tvar,Nf);
f = linspace(20*(10^6), 60*(10^6), Nf); % Frequency hopping signal range

p1 = zeros(1,N);
for k = 1:N
for i = 1:Nf
p(k,i) = exp(1j*2*pi*f(i)*t(k))*alpha(k,i);
p1(k) = p1(k) + p(k,i);
end
end

% Message signal
m0 = sin(2*pi*t);
n = length(m0);

figure(1)
plot(t, m0);

b = m0.*p1;

Please tell me whether p(k,i) is the correct way of declaring the signal in time domain or not
I have taken the idea of p(k,i) from an IEEE paper( have attached the reference equation - ignore the noise and time shift for time being)
How can I verify that what is done here is correct?
 

Attachments

  • equation.PNG
    11.8 KB · Views: 113

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…