Borrar filtros
Borrar filtros

how can i find a value that is bigger than 95% of the values in a given vector

10 visualizaciones (últimos 30 días)
I have a vector A=[X1; X2; X3; ...Xn] and i would like to find a value that is bigger than 95% of the components of this vector. How can i do this?

Respuesta aceptada

Star Strider
Star Strider el 24 de Nov. de 2017
Use the Statistics and Machine Learning Toolbox prctile (link) function to determine the 95th percentile.

Más respuestas (1)

Rik
Rik el 24 de Nov. de 2017
Sort the vector, multiply the length by 0.95 and use the rounded value as index.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by