⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ofdm_generation.m

📁 i hope use every file i put here to evry one and thank >
💻 M
字号:
function [ofdm_signal] = ofdm_generation(code)

global H

% get null number
s = get(H.edit9,'String');
NULL = st2de(s);
NULL = round(NULL);

%code = [0 0 0 1 1 0 1 1];

% buffer code with zeros on the end to make it divisible by 8
code = buffer(code,8);

% find out how many blocks of 8 are in the code
blocks = length(code) / 8;

% initialize the length of the code
len = 0;

% initialize ofdm signal
ofdm_signal = 0;

% create ofdm signal from code 8 bits at a time
for k = 1:blocks,
   
   % create NULL space between ofdm blocks (each block represents 8 bits)
   ofdm_signal(len + 1:len + NULL) = 0;
   
   % update length
   len = length(ofdm_signal);
   
   % create ofdm_block from 8 bits
   [ofdm_block,f] = ofdm_block_generation(code(k * 8 - 7 :k * 8));
   
   % add ofdm_block to overall ofdm_signal
   ofdm_signal(len + 1:len + length(ofdm_block)) = ofdm_block;
   
   % update length
   len = length(ofdm_signal);
end

ofdm_signal(len + 1:len + NULL) = 0;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -