?? generate_tx_data.m
字號:
function [tx_data]=generate_tx_data(num_tx,num_effect_carriers,modulation_type,num_frame)
% Function generate_tx_data +++++++++++++++++++++++++++++++++++++++++++++++++
% Generate transmit data
% Input data: num_tx - number of transmit antennas
% num_effect_carriers - number of the effective subcarriers for each antenna
% modulation_type - the modulation type
% num_frame - number of the frames
% Output data: tx_data - output transmit data matrix, in the form: tx_data(num_tx,num_effect_carriers,num_frame)
% Begin: Feb, 2005
% Last edited: Feb.2, 2005
% Feng Wan
switch modulation_type
case 1 % BPSK
tx_data=round(rand(num_tx,num_effect_carriers,num_frame))-0.5;
case 2 % QPSK
tx_data=(2*round(rand(num_tx,num_effect_carriers,num_frame))-1)...
+sqrt(-1)*(2*round(rand(num_tx,num_effect_carriers,num_frame))-1);
tx_data=tx_data/sqrt(2);
end
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -