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 个)

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

类别

Help CenterFile Exchange 中查找有关 Tables 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by