Hi there,

recently I wrote a UDF in order to calculate and plot the bivariate normal distribution.
Now I found the ghk function and tried to replicate the results, but unfortunately in vain.
I think that I miss-specify the second and third argument. How is a correct?

<hansl>
matrix U=mnormal(400,2)
matrix A =seq(0,400)/-100 #lower bound   
A=A'~A'
matrix B =seq(0,400)/100 #upper bound   
B=B'~B'
matrix vcv=unvech({1;0;2})
matrix f = ghk(cholesky(vcv),A,B,U')

nulldata 400 --preserve
series x1=U[,1]
series x2=U[,2]
series fxy=f[1:400]
<hansl>

Thanks in advance
Leon Unger