gusucode.com > UWB_matlab源码程序 > for_the_curious_reader/alpha_omega.m

    %                a l p h a                  %
%                                           %
%                                           %
%                                           %
%                                           %
%                                           %
%                                           %
%          [ type : alpha_omega  ]          %
%                                           %
%                                           %
%                                           %
%                                           %
%                                           %
%                                           %
Pow = 0;  fc = 50e9;  numbits = 1; Ts = 1e-9;
Ns = 3 ;  Np = 3 ;  Tm = 1e-9 ; tau = 0.4e-9;
bits =                  cp0201_bits(numbits);
r1 =                 cp0201_repcode(bits,Ns);
DScode =                       cp0202_DS(Np);
[P1,D1] =    cp0202_2PAM_DS(r1,fc,Ts,DScode);
power =                   (10^(Pow/10))/1000;
Ex =                              power * Ts;
w0 =              cp0201_waveform(fc,Tm,tau);
wtx =                         w0 .* sqrt(Ex);
Sa =                            conv(P1,wtx);
L =                (floor(Ts*fc))*Ns*numbits;
Stx =                                Sa(1:L);
ebno =                     linspace(40,8,50);
Eb =                 (1/numbits)*sum(Stx.^2);
EbNo =                        10.^(ebno./10);
No =                              Eb ./ EbNo;
nstdv =                          sqrt(No./2);
for j =                      1 : length(EbNo)
NS(j,:) =   nstdv(j) .* randn(1,length(Stx));
OUT(j,:) =                 NS(j,:) + Stx; end
F  =                               figure(1);
set(F,'Color','white');        S = surf(OUT);
set(S,'LineWidth',[2]);             SX = gca;
set(S,                    'MeshStyle','row');
set(SX,                    'Xcolor','white');
set(SX,                    'Ycolor','white');
set(SX,                    'Zcolor','white');
set(SX,    'CameraPosition',[909 -278 2.14]);
%                                           %
%                                           %
%      M.G. Di Benedetto - G. Giancola      %
%             Rome, Italy, 2004             %
%                                           %
%                                           %
%                                           %
%                                           %
%                                           %
%                 o m e g a                 %