Q:

Percentiles either side of the mean across a matrix - MATLAB

I have a matrix of data in this form:
5400    5700    6200    5200    6100    5500
5500    5900    7000    5900    6200    6000
6100    10300   7500    6200    6500    6600
6800    10900   7900    9400    9600    6600
7300    12500   10600   13000   10000   7900
7300    15700   10600   13200   14000   9200
11700   16200   11000   14900   14600   10800
12500   16500   11800   18100   14600   12900
13400   17000   19200   19300   16900   17100
14000   18700   20900   19700   17700   17700
14600   18800   22900   20200   17900   18500
15000   20800   24400   20800   19900   18700
15700   21100   25400   21500   22300   19700
16800   22000   26400   21700   22300   23300

The actual matrix is much larger.
I want to calculate two values for each row that describe the range of variation from the mean in terms of a percentile i.e. "95% of all values above the mean fall below X, and 95% of all value below the mean fall above Y".
What is the best method to do this?
Something like:
a = prctile(tcIED',0.90)

Produces only one value - which also appear to be inaccurate (lower than expected).

A:

Your approach is correct , but prctile expects percentages (between 0 and 100). So:
a = prctile(tcIED.', 90);

Or, equivalently, use quantile with proportions (between 0 and 1):
a = quantile(tcIED.', 0.9);

For example, with your data you get
>> a(1)
ans =
        6190

which means that about 90% of the values row 1 of your data matrix are less than or equal to 6190.

