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

📄 genrand.m

📁 matlab ofdm simulation
💻 M
字号:
function Datatx = genrand(NumSymb,wordsize,NumCarr,seed)
%GENRAND Generates random data to transmit
%	 Datatx = genrand(NumSymb,wordsize,NumCarr)
%
%	 Datatx = genrand(NumSymb,wordsize,NumCarr,seed)
%	 If a seed is given the the random data will always
%	 be the same when the same seed is given.
%	 Note : the previous random seed is unaffected.

if nargin == 4,
	prevseed = rand('seed');	%Save the old random seed
	rand('seed',seed);		%Set to new seed
	Datatx = floor(rand(NumSymb,NumCarr)*(2^wordsize)); %Generate the data
	rand('seed',prevseed);		%Restore the old seed
else
	Datatx = floor(rand(NumSymb,NumCarr)*(2^wordsize)); %Generate the data
end
	

⌨️ 快捷键说明

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