% Make a probability density plot as function of wind and current power...

wind_bin = 1000;
c_bin = 30;
max = 15;
clear density;

for i = 1:max
    for j = 1:max
        di = c_bin/max;
        dj = wind_bin/max;
        nn = find(c_power < di*i & c_power>di*(i-1) & wind_power < dj*j & wind_power>dj*(j-1));
        density(i, j) = length(nn);
    end;
end;

%[xx, yy] = meshgrid(wind_bin/max/2:wind_bin/max:(wind_bin-wind_bin/max/2), c_bin/max/2:c_bin/max:(c_bin-c_bin/max/2));
[xx, yy] = meshgrid(0:wind_bin/(max-1):wind_bin,0:c_bin/(max-1):c_bin);
pcolor(xx, yy, log(density))
xlabel('Wind Power (W)');
ylabel('Current Power (W)');
shading interp