Random sample generator from given pdf
Mostra commenti meno recenti
Hello everybody, I am a new user! I have a question regarding random sample generation in Matlab.
I have pdf function: 3/4(2x-x^2), x is on interval from 0 to 2. I have to generate sample that has the same distribution as mentioned before. What I have done so far: I calculated cdf by integrating and then obtained cdf^-1. I cannot solve the cdf^-1 equation for random x (from 0 to 1) as cdf^-1 is not solvable in Real numbers.
Am I doing something wrong? Any help would be greatly appreciated! Thanks in advance, Klemen.
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Random Number Generation in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!