I have a matrix in MATLAB and I need to find the 99% value for each column. In other words, the value such that 99% of the population has a larger value than it. Is there a function in MATLAB for this?
相关问题
- Extract matrix elements using a vector of column i
- Reshape matrix by rows
- Non-Conformable Arrays when Doing Matrix Multiplic
- How do you get R's null and residual deviance
- How to display an image represented by three matri
相关文章
- Numpy matrix of coordinates
- How do I append metadata to an image in Matlab?
- C++: How to use unnamed template parameters in cla
- How to compute the power of a matrix in R [duplica
- McNemar's test in Python and comparison of cla
- How can I write-protect the Matlab language?
- Create n by n matrix with unique values from 1:n
- Is there an API to get statictics on Google Play d
The simplest solution is to use the function QUANTILE as yuk suggested.
However, you will need the Statistics Toolbox to use the function QUANTILE. A solution that is not dependent on toolboxes can be found by noting that QUANTILE calls the function PRCTILE, which itself calls the built-in function INTERP1Q to do the primary computation. For the general case of a 2-D matrix that contains no NaN values you can compute the quantiles of each column using the following code:
This should give you the same results as calling QUANTILE, without needing any toolboxes.
If you do not have the Statistics Toolbox, there is always
or
depending on what you meant.
Use QUANTILE function.
where X is a matrix and P is scalar or vector of probabilities. For example, if P=0.01, the Y will be vector of values for each columns, so that 99% of column values are larger.