📄 ifft_cp_tx_blk.m
字号:
function ofdm_symbol = ifft_cp_tx_blk(inp_symbol,num_subc,guard_interval)
%------------------------------------------------------------
% IFFT and Circular Prefix Addition Block for Transmitter
% -------------------------------------------------------
% (EE359 Project: Andrew and Prateek)
% Inputs :
% inp_symbol : Input Symbol from all the Subcarriers
% num_subc : Number of Subcarriers
% guard_interval : Guard Interval based on OFDM Symbol
% Outputs :
% ofdm symbol : Output of IFFT and Guard Interval
% -----------------------------------------------------------
ofdm_symbol = ifft(inp_symbol,num_subc);
if (guard_interval > length(ofdm_symbol))
error(' The guard interval is greater than the ofdm symbol duration ');
end
% The guard symbol is the copy of the end of the ofdm symbol to the beginning
% of the ofdm symbol.
guard_symbol = ofdm_symbol(end-guard_interval+1:end);
% Add the cyclic prefix to the ofdm symbol
ofdm_symbol = [guard_symbol ofdm_symbol];
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -