how to generate continuous data symbol (random real number)?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Chetan Fadnis
il 3 Nov 2022
Commentato: Walter Roberson
il 9 Nov 2022
Consider a symbol s, with zero mean, E{s}=0, variance 1 and amplitude A=2, such that,
.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1186493/image.png)
I want to generate a random real number s. Kindly help. Thanks in anticipation.
1 Commento
Walter Roberson
il 9 Nov 2022
(rand()*2-1) * A
would be uniform distribution with mean 0 and in the range -A to +A.
Unfortunately it will not have the right variance, so you will not be able to use uniform random distribution.
Risposta accettata
Pulkit
il 9 Nov 2022
Hi,
According to my understanding you want to generate random real numbers “s” for some distribution with specific mean and variance. . Since the distribution is not mentioned, let us assume that you want to generate random symbols from the Normal Distribution, you can refer to the following link,
Hope this helps!
1 Commento
Walter Roberson
il 9 Nov 2022
Normal distribution cannot generate in a range -- not unless you use a truncated normal distribution.
betarnd can give continuous random numbers within a range and that are non-uniform.
Più risposte (0)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!