function pdim(h,p,m)

%attempts to calculate the p-dimension of an energy measure (with harmonic
%function h) to level m. However, you can't get much farther than level 7
%unless you leave it running for a while, but the computations are probably
%not very accurate since we can only go this far. To test it out, try p=2;
%the 2-dimension should be log(25/11)/log(5/3).

x=plotemeasure(h,m);
%z=net(m);
size(x);
%size(z);
hold off

log(sum(x.^p))./((p-1)*log(3/5))


%plot3(z(:,1),z(:,2), log(x)./(m*log(3/5)), '.')


%{
y=SG(m);
for n=1:1:3^(m)
    hold on
    
    plot3([y(3*n-2:3*n,1); y(3*n-2,1)],[y(3*n-2:3*n,2) ;y(3*n-2,2)], [0 0 0 0], 'y')
end
%}