samedi 26 janvier 2019

To define a new Random Variable in MATLAB

I am new to MATLAB. I have been given 2 random variables X and Y with a continuous uniform distribution in the interval (0,1) and I created it using:

X = makedist('Uniform','lower',0,'upper',1); Y = makedist('Uniform','lower',0,'upper',1);

The variable that I am to create should be a combination of X and Y and should be along the line of Z = sqrt(-2*log(1-X))*cos(2*pi*Y)

However, it gives me the following error- Undefined operator '-' for input arguments of type 'prob.UniformDistribution'.

How should I tackle this problem and where am I going wrong with this?




Aucun commentaire:

Enregistrer un commentaire