MATLAB: How to generate random numbers of two correlated variables following lognormal probability distribution

correlation co-efficientlognormal distribution

Let A and B are two random variables, following lognormal probability distribution. These two variables has a value of correlation between each other. I have to generate random numbers for these two variables.
Please suggest me any function or describe the process to do the necessary calculation for generation of these random numbers.

Best Answer

If N has a normal distribution, exp(N) has a lognormal distribution:
x = -10:0.1:10;
N = randn(1, 10^6);
plot(x,hist(N, x), 'r', x, hist(exp(N), x), 'b')
legend({'normal', 'lognormal'})