www.gusucode.com > wlan 源码程序 matlab案例代码 > wlan/BuildS1GPPDUExample.m

    %% Build S1G PPDU
% This example shows how to build S1G PPDUs by using the waveform generator
% function.
%% Waveform Generator
% Create an S1G configuration object.
s1g = wlanS1GConfig;
%%
% Generate the S1G PPDU. The length of the input data sequence in bits must
% be 8 times the length of the PSDU, which is expressed in bytes. Turn off
% windowing.
x = randi([0 1],s1g.PSDULength*8,1);
y = wlanWaveformGenerator(x,s1g,'WindowTransitionTime',0);
%%
% Plot the magnitude of the waveform.
t = ((1:length(y))'-1)/80e6;
plot(t,abs(y))
xlabel('Time (s)')
ylabel('Magnitude (V)')