MATLAB: Quantiles of a matrix

statistics

Hello,
when using the quantile(x,p) function on a N by N matrix it returns a 1xN vector – is there a function which computes a 1×1 scalar quantile of the whole matrix?
Many thanks

Best Answer

quantile(quantile(x,p),p)
%or maybe
quantile(x(:),p)