www.pudn.com > mimo_ofdm.rar > ifft_cp_tx_blk.m, change:2004-11-20,size:1003b
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];