% Find current levels as a function of probability distribution...

[csa, ix_csa] = sort(c_speed);

for i = 1:100
    perc(i) = i/100;
    cperc(i) = csa(round(n*perc(i)));
end;

plot(cperc, perc);
xlabel('Current Speed (cm/s)');
ylabel('% Time Current less that Indicated Amount');

% ----

[wsa, ix_wsa] = sort(wind_speed);

for i = 1:100
    perc(i) = i/100;
    wperc(i) = wsa(round(n*perc(i)));
end;

plot(wperc, perc);
xlabel('Wind Speed (m/s)');
ylabel('% Time Wind less that Indicated Amount');

% ----

[cpa, ix_wpa] = sort(c_power);

for i = 1:100
    perc(i) = i/100;
    cpperc(i) = cpa(round(n*perc(i)));
end;

plot(cpperc, perc);
xlabel('Current Power (W)');
ylabel('% Time Current Power less that Indicated Amount');

% ----

[wpa, ix_wpa] = sort(wind_power);

for i = 1:100
    perc(i) = i/100;
    wpperc(i) = wpa(round(n*perc(i)));
end;

plot(wpperc, perc);
xlabel('Wind Power (W)');
ylabel('% Time Wind Power less that Indicated Amount');