DSPRelated.com

zero mean random variables

Started by mohan prasad in Matlab DSP21 years ago 1 reply

Hi, Am trying to generate complex gaussian random variables using the randn function but when I calculated the mean of those...

Hi, Am trying to generate complex gaussian random variables using the randn function but when I calculated the mean of those random variables it is not giving zero as answer.Can anyone tell why this is happening? mohan


fix random rumbers

Started by Romain Govav in Matlab DSP19 years ago 2 replies

Dear all, I am writing a program within which I am genereting random normal numbers. I would like to get the same random...

Dear all, I am writing a program within which I am genereting random normal numbers. I would like to get the same random numbers from run to run. This helps me to check my program. Can anybody help me? thanks in advance Romain


=?utf-8?B?UmU6IFttYXRsYWJdIFJhbmRvbSBJbnRlZ2VyIEdlbmVyYXRvciAtIFNpbXVsaW5r?=

Started by Amaren Prasanna das in Matlab DSP14 years ago

use "random number" block or "uniform random" nuber block in the "source library" of simulink. vary the param acccordingly On Fri, 13 Nov 2009...

use "random number" block or "uniform random" nuber block in the "source library" of simulink. vary the param acccordingly On Fri, 13 Nov 2009 01:03:54 +0530 wrote > Hi, How do i generate random numbers between given limits in simulink. For ex: between 25 - 30. At every sample time one of the value between 25 to 30 should be given out. (could be25, 26 , 30, 28, 25, 29, etc.,) T


Looking forward to ur suggestions 4 Matlab random generator

Started by nishubhardwaj in Matlab DSP18 years ago 3 replies

hello frnds, I have a doubt about selecting random no generating capacity of matlab. Can any one suggest me using random no generator...

hello frnds, I have a doubt about selecting random no generating capacity of matlab. Can any one suggest me using random no generator in order to randomly select an element from a the elements of the given array? for eg if the array is AR=[1,2, 3, 4 , 6] then the random number generator should be able to select any element from the AR randomly


Re: Random numbers

Started by siva prasad motamarri in Matlab DSP22 years ago

hi, u can use 'rand' function in Matlab which gives the uniform random in the range (0,1). if u want Random numbers in (-1,1)...

hi, u can use 'rand' function in Matlab which gives the uniform random in the range (0,1). if u want Random numbers in (-1,1) use 2*rand(1,20)-1 so for (-100,100) 100*(2*rand(1,20)-1); hope it will helps u. if u aren't intrested to use 'rand' fun


random rearrangement a vector

Started by Emre ARDALI in Matlab DSP16 years ago 2 replies

Hi everybody; I want to learn about if it is possible rearrange a vector in MATLAB in a random manner. For example i have the vector=[1 3 5 8 7...

Hi everybody; I want to learn about if it is possible rearrange a vector in MATLAB in a random manner. For example i have the vector=[1 3 5 8 7 0] and i want a new vector using the vector elements but different order i.e. new_vector=[0 7 3 1 8 5 ]; this order sould be random. Any idea? I think to use "randint" to regenerate indexes then create new vector using new index order. But problem is...


Random

Started by Murairwa in Matlab DSP15 years ago

What is the matlab code for random selection of a starting point?

What is the matlab code for random selection of a starting point?


How I can get initial random states from gatool

Started by Aylin Gunel in Matlab DSP15 years ago

Hi, I need to get initial random states from gatool. I know there is a check box to obtain the random states from previous run, but how can I...

Hi, I need to get initial random states from gatool. I know there is a check box to obtain the random states from previous run, but how can I can save these states for next enterence to matlab.


Simulating a Random Signal

Started by onth...@gmail.com in Matlab DSP17 years ago

Dear all, I am working on trying to simulate a random signal of a given frequency range (say between 0 and 5000 Hz) in MATLAB. I have used...

Dear all, I am working on trying to simulate a random signal of a given frequency range (say between 0 and 5000 Hz) in MATLAB. I have used signal generator apparatus in which I just select the kind of signal output (Sine or Random) and choose a frequency range. If I was to simulate the above in MATLAB, how could I do it? I would be really grateful for any help on this. Merry Christm...


How to generate Random Vectors given Covariance Matrix?

Started by Yanjun Yan in Matlab DSP20 years ago 1 reply

Hi, All: Do you know how should I generate the Random Vectors given the Covariance Matrix? Or in general, how should I...

Hi, All: Do you know how should I generate the Random Vectors given the Covariance Matrix? Or in general, how should I realize the correlation between Random variables? eg: X=[x1,x2] Covariance Matrix is[1,0.5;0.5,1] I want to generate 10


Random Integer Generator - Simulink

Started by vd.a...@yahoo.co.in in Matlab DSP14 years ago

Hi, How do i generate random numbers between given limits in simulink. For ex: between 25 - 30. At every sample time one of the value between...

Hi, How do i generate random numbers between given limits in simulink. For ex: between 25 - 30. At every sample time one of the value between 25 to 30 should be given out. (could be25, 26 , 30, 28, 25, 29, etc.,) Thanks, Ashwini


PSD of Random Numbers using MATLAB

Started by Karthikeyan Kittappan in Matlab DSP15 years ago 1 reply

Hi, I am an Mechanical student and i am trying to generate a random rough surface (with specified ACF and Std Deviation) using 2D FIR filter...

Hi, I am an Mechanical student and i am trying to generate a random rough surface (with specified ACF and Std Deviation) using 2D FIR filter in Matlab. I come across a paper that helps me doing that. For that, first i need to generate a input sequence composed of independent random numbers {?(I,J)}. The paper says its PSD must be a constant. I used matlab to generate independent r...


Introduce Single Error Bit

Started by tp_viju in Matlab DSP16 years ago 1 reply

Hi, I got a program as below which generates random binary codes (Phase 1.1). After that have to add parity bit to the codes(1.2). The...

Hi, I got a program as below which generates random binary codes (Phase 1.1). After that have to add parity bit to the codes(1.2). The next step is to generate error to the code, but it generates error ( Index exceeds matrix dimensions). Y is it so and some one got the right answer? %Phase 1.1 n=10;% # of bits b=round(rand(1,n));% creates random binary code disp('Random Da...


random variable of desired pdf

Started by nammi sairamesh in Matlab DSP19 years ago

Arun, f= a*f1+b*f2, ya, u guessed right! f1 na df2 have noramla distribution , but not different means and variances, and now...

Arun, f= a*f1+b*f2, ya, u guessed right! f1 na df2 have noramla distribution , but not different means and variances, and now i wanna generate a random variable with pdf of f. This is the question i asked initially! Regards, -SaiRamesh. --- wrot


Random numbers in MATLAB6

Started by Bart Hautala in Matlab DSP21 years ago 4 replies

Saw the past post about generating random numbers from -100 to 100 but what if I needed to generate them from like -20 to -10? or...

Saw the past post about generating random numbers from -100 to 100 but what if I needed to generate them from like -20 to -10? or 4.5 to 5?


How to get random signal samples from a given PSD?

Started by tony...@hotmail.com in Matlab DSP18 years ago 1 reply

Hello everybody, first of all I would like to apologize if what I'm asking is terribly obvious or if what I'm saying is completely...

Hello everybody, first of all I would like to apologize if what I'm asking is terribly obvious or if what I'm saying is completely wrong. I'm quite new at discrete signal processing! Probably it will sound quite strange to most of you since it isn't something which usually occurs in practical situations, but I need to get samples of a random s


Random number

Started by Anonymous in Matlab DSP19 years ago 2 replies

Hi All, I need generate random numbers in range like -2 to 2 ,-1.8 to 1.8 ,-1.6 to 1.6 and so on...I am doing this for N =...

Hi All, I need generate random numbers in range like -2 to 2 ,-1.8 to 1.8 ,-1.6 to 1.6 and so on...I am doing this for N = 1024 .At present I use unifrnd in MATLAB . something like for i=1:1:1024 a(i)=unifrnd(-2,2); end When I calculate the mean its


Correlated Random Sequences

Started by Shailesh Khanolkar in Matlab DSP18 years ago 2 replies

Hi, How do i generate correlated random sequences using Matlab? A sample code would be very helpful. Shailesh V Khanolkar

Hi, How do i generate correlated random sequences using Matlab? A sample code would be very helpful. Shailesh V Khanolkar


Periodic Random bit with period N = 15

Started by nguyenetung in Matlab DSP20 years ago

Hi everybody, I just start to study something about Matlab. My question is: If I have a periodic random bit with period N = 15...

Hi everybody, I just start to study something about Matlab. My question is: If I have a periodic random bit with period N = 15 is given as x(k)= [0 0 0 1 0 0 1 1 0 1 0 1 1 1 1]. Find the correlation sequence by using the following equation, and plot it R(m) = (No. of agrr


Introduce correlation into wireless fading channel

Started by cash...@gmail.com in Matlab DSP16 years ago

Hi experts I need to simulate wireless MIMO fading channel in both Gaussian and Rayleigh random variables. I have implemented the channel...

Hi experts I need to simulate wireless MIMO fading channel in both Gaussian and Rayleigh random variables. I have implemented the channel matrix H = h11 h12 h21 h22 where h11 h12 h21 h22 are independent Gaussian or Rayleigh random variables. Could somebody teach me how to introduce correlations among thoese random variables in terms of correlation coefficient? Thanks for any he...