DSPRelated.com

zero mean random variables

Started by mohan prasad in Matlab DSP22 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


=?utf-8?B?UmU6IFttYXRsYWJdIFJhbmRvbSBJbnRlZ2VyIEdlbmVyYXRvciAtIFNpbXVsaW5r?=

Started by Amaren Prasanna das in Matlab DSP15 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 DSP19 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


fix random rumbers

Started by Romain Govav in Matlab DSP20 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


random rearrangement a vector

Started by Emre ARDALI in Matlab DSP17 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 DSP16 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 DSP16 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.


Re: Random numbers

Started by siva prasad motamarri in Matlab DSP23 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


How to generate Random Vectors given Covariance Matrix?

Started by Yanjun Yan in Matlab DSP22 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


Simulating a Random Signal

Started by onth...@gmail.com in Matlab DSP18 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...


Random Integer Generator - Simulink

Started by vd.a...@yahoo.co.in in Matlab DSP15 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 DSP16 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 DSP17 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...


How to get random signal samples from a given PSD?

Started by tony...@hotmail.com in Matlab DSP19 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 DSP20 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


random coefficient for logit models

Started by guozhanmit in Matlab DSP21 years ago

Anybody here has experience on writing code for logit models with random coefficients? Thanks a lot!!!

Anybody here has experience on writing code for logit models with random coefficients? Thanks a lot!!!


random sample generation from Hyper-Erlang distribution

Started by tpkay2001 in Matlab DSP16 years ago

Dear All, my project requires me to generate random samples which follow a Hyper- Erlang distribution. How can i do this in Matlab? In my...

Dear All, my project requires me to generate random samples which follow a Hyper- Erlang distribution. How can i do this in Matlab? In my case, the Hyper-Erlang distribution consists of weighted sum of 2 erlang distributions. (very much the same as hyper exponential distirbution, which is made up of weighted sum of exponentials) Matlab is able to generate random samples from some commo...


real random numbers generation

Started by Appalayagari Sreedhar in Matlab DSP22 years ago

Hi, I need to generate real random numbers between two numbers, like i need values between 0.5 and 0. i tried with rand...

Hi, I need to generate real random numbers between two numbers, like i need values between 0.5 and 0. i tried with rand command it is working well, but i need to write an algorithm in matlab not using the built-in function. if anyone knows it


random variable of desired pdf

Started by nammi sairamesh in Matlab DSP20 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


Correlated Random Sequences

Started by Shailesh Khanolkar in Matlab DSP19 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