Thank you Wolfgang ,
I got both plots OK(for theta = 0 and theta = 90 degrees). Now I am trying to apply your program to a real data set but I am having some problems. The data set consist of 200 x 50 points (impedances) contained in a 2D rectangular cross section. The coordinates x and y and the impedance are arranged in three vectors, each of them of dimension 200x 50 = 10000. The function in the script file is given by:
d = variogram([x y], impedance, 'nrbins',50,'anisotropy',true, 'thetastep',30);
The error message: “ Anisotropy is only supported for 2D",

Very good function; is possible calculate variograms at different angles, for example vertical and horizontal variograms? If you can do this how do you specify the angles and how do you plot them,
Thank you
Jorge