Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Matlab code for Gaussaion distribution

Status
Not open for further replies.

zio_nneo

Full Member level 2
Joined
Jun 3, 2007
Messages
145
Helped
8
Reputation
16
Reaction score
5
Trophy points
1,298
Activity points
2,212
Do anybody have matlab code for Gaussion Distribution generation?
 

Hi

use randn()

Sal
 

x and z are RV of gaussiana distribution and not correlated,
y is a RV of a gaussiana distribution and correlated with x

n=2^13;
x=randn(1,n)+3;
z=randn(1,n)+4;
y=zeros(1,n);
m=50;
for i =1:n-m
y(i)=mean(x(i:i+m-1));
end
plot([x(1:100)' y(1:100)']); grid

The density function:

[fx,kx]=hist(x,50);
fx=fx/sum(fx);
[fy,ky]=hist(y,50);
fy=fy/sum(fy);
plot(kx,fx,'b',ky,fy,'r');grid

and finally the distribution function:

Fx=cumsum(fx);
Fy=cumsum(fy);
plot(kx,Fx,'b',ky,Fy,'r');grid

If this code is helpful, please push the helped button. Thanks
 

the Pre-requisite is the Tx_data. and then run this program.


SNR=1o; % in dB; change value accordingly
Tx_signal_power = var(Tx_data);
%
linear_SNR = 10^(SNR/10);
noise_sigma = Tx_signal_power/linear_SNR;
noise_scale_factor = sqrt(noise_sigma);
%
noise = randn(1, length(Tx_data))*noise_scale_factor;


Regards,
Naveed
 

plg send me mat lab code for gram charlier series as a correction of gaussian distribution
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top