I have this code which calculates the mean value of all wind speeds in the 99th percentile. The trouble is I have wind data for 1949-1999 in the workspace (named nineteen_49 through to 99) I am struggling to make a loop which calls the name of the new variable each time and also creates new variables in place of x, y and j – can anybody help?:
% calculate value of 99th percentile value for wind spd
x = prctile(nineteen_49(:,6),99)% create logical matrix that corresponsds to all wind speed values of great
% than 99th percentile (collecton o 0's and 1's where 1 denotes the
% location of each value great > x
y = nineteen_49(:,6) > x% create a vector j that is the 6th column of 1949 (ie just speeds)
j = nineteen_49(:,6)% calculate the mean of 99th percentile values
mean_99th_percentile_1949 = mean(j(y))% calculate the frequency of events over
Best Answer