Retrieve data of a row in the table

1 回表示 (過去 30 日間)
hang dong
hang dong 2019 年 5 月 26 日
コメント済み: hang dong 2019 年 5 月 26 日
I have a table with 2 columns as follows:
1.PNG
pos column consists of integers from 1 -> n,
iwant column contains permutations of string 012345
How can I get a pos when I know iwant?
desired results: iwant = '542031' ---> pos = 11
Help me! Thank you very much!
  1 件のコメント
hang dong
hang dong 2019 年 5 月 26 日
What is the error when running the results below?
2.PNG

サインインしてコメントする。

回答 (1 件)

J. Alex Lee
J. Alex Lee 2019 年 5 月 26 日
You could do
T.pos(T.iwant==542031)

カテゴリ

Help Center および File ExchangeTables についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by