c7_boxmul.m
来自「《通信系统仿真原理与无线应用》配套MATLAB源码」· M 代码 · 共 13 行
M
13 行
% File: c7_boxmul.m
% Software given here is to accompany the textbook: W.H. Tranter,
% K.S. Shanmugan, T.S. Rappaport, and K.S. Kosbar, Principles of
% Communication Systems Simulation with Wireless Applications,
% Prentice Hall PTR, 2004.
%
function [out1,out2]=c7_boxmul(N)
u1 = rand(1,N); % generate first uniform RV
u2 = rand(1,N); % generate second uniform RV
ray = sqrt(-2*log(u1)); % generate Rayleigh RV
out1 = ray.*cos(2*pi*u2); % first Gaussian output
out2 = ray.*sin(2*pi*u2); % second Gaussian output
% End of function file.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?