encoding NRZ polar as square wave ?
Mostrar comentarios más antiguos
Hello I have tried to encode my binary information over specific interval in time
fb= 1e3; % the channel date rate
Tb=1/fb; % the bit period or bit interval
fs=16*fb; %Sampling frequency
Ts=1/fs;
a=[0 1 0 1 1 0 1 1 0 0 0 1]
t=0:Ts:Tb*length(a)-Ts;
i=1;
%nrzData
for j = 1:length(t)
if t(j)<=i
y(j)=a(i);
else
y(j)=a(i);
i=i+1;
end
end
I have got all them as -1 , even if I have try a_e=[-1 1 -1 1 1 -1 1 1 -1 -1 -1 1] instead of a.
Could you please help to generate the encoding array ?
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre MATLAB Mobile en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!