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

2 次查看(过去 30 天)
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?

采纳的回答

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

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Resizing and Reshaping Matrices 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by