Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
Gngauss.m
Package: 现代通信系统matlab版源代码.zip [view]
Upload User: loeagle
Upload Date: 2013-03-02
Package Size: 1236k
Code Size: 1k
Category:
Communication Document
Development Platform:
Matlab
- function [gsrv1,gsrv2]=gngauss(m,sgma)
- % [gsrv1,gsrv2]=gngauss(m,sgma)
- % [gsrv1,gsrv2]=gngauss(sgma)
- % [gsrv1,gsrv2]=gngauss
- % GNGAUSS generates two independent Gaussian random variables with mean
- % m and standard deviation sgma. If one of the input arguments is missing
- % it takes the mean as 0, and the standard deviation as the given parameter.
- % If neither mean nor the variance is given, it generates two standard
- % Gaussian random variables.
- if nargin == 0,
- m=0; sgma=1;
- elseif nargin == 1,
- sgma=m; m=0;
- end;
- u=rand; % a uniform random variable in (0,1)
- z=sgma*(sqrt(2*log(1/(1-u)))); % a Rayleigh distributed random variable
- u=rand; % another uniform random variable in (0,1)
- gsrv1=m+z*cos(2*pi*u);
- gsrv2=m+z*sin(2*pi*u);