0

I am trying to generate a Monte Carlo sample of the following model:

y=20/sqrt(x1)*10^((x2-x3)/20)*x4*10^((x5-x6)/20).

In Matlab, am using the following code to generate a random sample of N size for the k variables. The input variables are assumed to be uniformly distributed in (0;1)

%generation of uniform samples in (0;1)

for i=1:N
   X=[];
   T = rand(1,2*k);

   %PREPARATION OF THE SAMPLE MATRIX X 

   A=T(1:k);
   B=T(k+1:2*k);
   X=[A;B];

   for j=1:k;
    Ab=A;
    Ab(j)=B(j);
    X=[X;Ab];
   end
   end

I have two questions: 1) How to define the model y = f(x1,..,x6)? 2) What if I would like to change the pdf of the parameters from uniform to e.g. log-uniform?

Thanks for your help.

Max
  • 12,622
  • 16
  • 73
  • 101

0 Answers0