随机序列发生器,是一个m序列,生成函数都写在里面,位宽为4,可以改变!-random sequence generator, m is a sequence, generating function will be included in the inside, for four bit-can be changed! Update : 2008-10-13
Size : 115.03kb
Publisher : lw234620
随机序列发生器,是一个m序列,生成函数都写在里面,位宽为4,可以改变!-random sequence generator, m is a sequence, generating function will be included in the inside, for four bit-can be changed! Update : 2025-04-07
Size : 115kb
Publisher : lw234620
The file calculates and plots FM noise sidebands for a carrier. It also does sinusoidal modulation. This simple way of adding noise to a carrier is useful for simulation of PLLs. It turns out, though, that the mean of the randn function is not as close to zero as it could be, and this causes the fft to generate extra sideband energy, which makes it appear as if the noise is not what would be expected. This program gets around this by adding a fudge factor to the randn results to eliminate this problem. It took me ages to figure this out, I hope to reduce a similar effort for others. Update : 2025-04-07
Size : 2kb
Publisher : Rafal
IS95中的数据流伪随机序列的产生。用matlab中randn实现-IS95 data streams to be pseudo-random sequence generation. Achieved using randn in matlab Update : 2025-04-07
Size : 8kb
Publisher : lixiao
瑞丽信道仿真
噪声信号由MATLAB函数randn(1,N)产生,它从均值为0、方差为1的正态分布中产生N个伪随机数。每次迭代时,要使用相应的标准差对噪声的幅度进行尺度变换,最后,将输入信号和噪声信号相加得到输出信号。-Ruili channel simulation noise signal by the MATLAB function randn (1, N) generated, which from the mean 0, variance for a normal distribution N generate a pseudo-random numbers. Each iteration, it is necessary to use the corresponding standard deviation of the noise amplitude scaling, finally, the input signal and the noise signal to be added to the output signal. Update : 2025-04-07
Size : 1kb
Publisher : eunice
rapresents AR(1) model. dsp and correlation funtion of the ar(1) MODEL. it uses randn to generate vector and filter to do ar(1). Update : 2025-04-07
Size : 1kb
Publisher : lelepal
w=(randn(1,M)-randn(1,M))/100
d=zeros(1,M)
u=zeros(1,M)
u_out=zeros(1,e_max-M)
f_out=zeros(1,e_max-M)
X delayed input data vector
Y measured signal
W coefficient vector
E enhanced signal
clc
N=30 filter length
M=30 delay
w0=1 initial value for adaptive filter coefficients
SF=2048 factor for reducing the data samples - 11 bit ADC assumed
mu=0.04 - w=(randn(1,M)-randn(1,M))/100
d=zeros(1,M)
u=zeros(1,M)
u_out=zeros(1,e_max-M)
f_out=zeros(1,e_max-M)
X delayed input data vector
Y measured signal
W coefficient vector
E enhanced signal
clc
N=30 filter length
M=30 delay
w0=1 initial value for adaptive filter coefficients
SF=2048 factor for reducing the data samples - 11 bit ADC assumed
mu=0.04 Update : 2025-04-07
Size : 1kb
Publisher : venkat
常用的产生通用特殊矩阵的函数有:zeros:产生全0矩阵。ones:产生全1矩阵。eye:产生单位矩阵。rand:产生0~1间均匀分布的随机矩阵。randn:产生均值为0,方差为1的标准正态分布随机-Production of commonly used generic special matrix functions are: zeros: produce the 0 matrix. ones: generate all 1 matrix. eye: production unit matrix. rand: produce 0 ~ a uniformly distributed random matrix. randn: generate mean 0, variance 1, the standard normal random Update : 2025-04-07
Size : 185kb
Publisher : wgy
基于IFFT\FFT的OFDM系统仿真。完整的可运行的代码。信源用randn产生,信道为高斯白噪声,如用其他,可以方便自行修改。-Based on IFFT \ FFT of OFDM system simulation. Complete code can be run. Generated using randn source, channel for the Gaussian white noise, such as the use of other, you can easily modify. Update : 2025-04-07
Size : 1kb
Publisher : 彭俊
Avetis Ioannisyan
avetis@60ateight.com
Last Updated: 11/30/05
LMS Channel Adaptation
reset randomizers
randn( state ,sum(100*clock))
rand( state ,sum(100*clock))
numPoints = 5000
numTaps = 10 channel order
Mu = 0.001:0.001:0.01 iteration step size
input is guassian
x = randn(numPoints,1) + j*randn(numPoints,1)
choose channel to be random uniform
h = rand(numTaps, 1) + i*rand(numTaps, 1)
h = [1 0 0 0 1] testing only
h = h/max(h) normalize channel
convolve channel with the input
d = filter(h, 1, x)
initialize variables
w = []
y = []
in = []
e = [] error, f- Avetis Ioannisyan
avetis@60ateight.com
Last Updated: 11/30/05
LMS Channel Adaptation
reset randomizers
randn( state ,sum(100*clock))
rand( state ,sum(100*clock))
numPoints = 5000
numTaps = 10 channel order
Mu = 0.001:0.001:0.01 iteration step size
input is guassian
x = randn(numPoints,1) + j*randn(numPoints,1)
choose channel to be random uniform
h = rand(numTaps, 1) + i*rand(numTaps, 1)
h = [1 0 0 0 1] testing only
h = h/max(h) normalize channel
convolve channel with the input
d = filter(h, 1, x)
initialize variables
w = []
y = []
in = []
e = [] error, f Update : 2025-04-07
Size : 1kb
Publisher : josh
clear all
clc
t=0:1/1000:10-1/1000
s=sin(2*pi*t)
snr=20
s_power=var(s) varience of s
linear_snr=10^(snr/10)
factor=sqrt(s_power/linear_snr)
noise=randn(1,length(s))*factor
x=s+noise Ó É SNR¼ Æ Ë ã Ë æ » úÔ ë É ù
x1=noise Ô ë É ùÔ ´ Ê ä È ë
x2=noise
w1=0 È ¨Ï µ Ê ý ³ õ Ö µ
w2=0
e=zeros(1,length(x))
y=0
u=0.05
for i=1:10000 LMSË ã ·¨
y(i)=w1*x1(i)+w2*x2(i)
e(i)=x(i)-y(i)
w1=w1+u*e(i)*x1(i)
w2=w2+u*e(i)*x2(i)
end
figure(1)
subplot(4,1,1) -clear all
clc
t=0:1/1000:10-1/1000
s=sin(2*pi*t)
snr=20
s_power=var(s) varience of s
linear_snr=10^(snr/10)
factor=sqrt(s_power/linear_snr)
noise=randn(1,length(s))*factor
x=s+noise Ó É SNR¼ Æ Ë ã Ë æ » úÔ ë É ù
x1=noise Ô ë É ùÔ ´ Ê ä È ë
x2=noise
w1=0 È ¨Ï µ Ê ý ³ õ Ö µ
w2=0
e=zeros(1,length(x))
y=0
u=0.05
for i=1:10000 LMSË ã ·¨
y(i)=w1*x1(i)+w2*x2(i)
e(i)=x(i)-y(i)
w1=w1+u*e(i)*x1(i)
w2=w2+u*e(i)*x2(i)
end
figure(1)
subplot(4,1,1) Update : 2025-04-07
Size : 1kb
Publisher : dasu
The file calculates and plots FM noise sidebands for a carrier. It also does sinusoidal modulation. This simple way of adding noise to a carrier is useful for simulation of PLLs. It turns out, though, that the mean of the randn function is not as close to zero as it could be, and this causes the fft to generate extra sideband energy, which makes it appear as if the noise is not what would be expected. This program gets around this by adding a fudge factor to the randn results to eliminate this problem. It took me ages to figure this out, I hope to reduce a similar effort for others Update : 2025-04-07
Size : 3kb
Publisher : zfhou
HISTNORM Histogram normalized
[...] = HISTNORM(...) works like HIST, but the frequency is normalized
so that area sum is 1.
Bonus usage!
[...] = HISTNORM(..., plot ) plots and returns the output arguments.
Be sure plot is the last argument.
Example:
data = randn (10000, 1)
[xo,no] = histnorm(data, 101, plot )
hold on
plot (no, normpdf(no), r )
hold off
See also: HIST.- HISTNORM Histogram normalized
[...] = HISTNORM(...) works like HIST, but the frequency is normalized
so that area sum is 1.
Bonus usage!
[...] = HISTNORM(..., plot ) plots and returns the output arguments.
Be sure plot is the last argument.
Example:
data = randn (10000, 1)
[xo,no] = histnorm(data, 101, plot )
hold on
plot (no, normpdf(no), r )
hold off
See also: HIST. Update : 2025-04-07
Size : 1kb
Publisher : Cystrin