How to get the index of new number in descending sequence vector

1 vue (au cours des 30 derniers jours)
fyza affandi
fyza affandi le 17 Nov 2018
Modifié(e) : madhan ravi le 17 Nov 2018
I have probability named A and B
A=[ 0.6 0.2 0.1 0.5 0.5]
B=[ 0.15]
Then the probabilty is arranged and named C
C=[0.6 0.2 0.15 0.1 0.5 0.5]
how can I get to know that probability B is at column 3?

Réponse acceptée

madhan ravi
madhan ravi le 17 Nov 2018
Modifié(e) : madhan ravi le 17 Nov 2018
location=find(ismember(C,B))
Note: logical indexing is faster than find
  2 commentaires
fyza affandi
fyza affandi le 17 Nov 2018
Thank you. What is vector C havent created? How to add vector B into A and sort in descending order?
madhan ravi
madhan ravi le 17 Nov 2018
how can I get to know that probability B is at column 3?
Anytime :) ,The answer above is for this question

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Resizing and Reshaping Matrices dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by