Would anybody know if there is a function in matlab to transform a continuous random variable x to a uniform distribution by using a cumulative distribution function (cdf) transformation?
Any comments and suggestions welcome.
Log in to comment.
Direct link to this answer:
You can call cdf specifying the type of distribution or you can call directly the specific distribution function. For a list of supported cdfs: cumulative distributions.
x = randn(1000,1);
y = normcdf(x,0,1);
Direct link to this comment:
Thank you for your reply.
So as I understand this, using the cdf function returns the cumulative distribution of the data of a specified distribution.
Would you know how I could use the cdf to then transform the continuous random variable to a uniform distribution?
Apologies if this sounds like a silly question, I only have basic statistics?
The Cumulative Distribution Function (CDF) maps some values into [0,1], i.e. uniform distribution on [0,1].
Log in to answer this question.
MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi
Opportunities for recent engineering grads.
New to MATLAB?
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
Choose your country to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a location from the following list:
See all countries