Hi,
I have a dataset (DIS) that has the following dimensions (27,23,360). I could use some help in using a for loop and how to tackle the problem below.
So I want to calculate the percentile (Q90), which represents a treshold, of each element over the 3rd dimensions. And then present in a new array (27,23) the percentage of points that fall below this treshold.
So I first did this for the element in the first row and column to get an idea how I can calculate this:
DIS_1_1 = reshape(DIS(1,1,:),[1,360]);
DIS_1_1_Q90 = prctile(DIS_1_1,90);
DIS_1_1_belowQ90 = sum(DIS_1_1 < DIS_1_1_Q90) ./ 360 * 100;
Now I want to calculate this for every row and column. I hope someone can also give me some tips so that i can solve these kind of problems in the future.
Thanks in advance, Ruben
Best Answer