Filter löschen
Filter löschen

Retrieve data of a row in the table

1 Ansicht (letzte 30 Tage)
hang dong
hang dong am 26 Mai 2019
Kommentiert: hang dong am 26 Mai 2019
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 Kommentar
hang dong
hang dong am 26 Mai 2019
What is the error when running the results below?
2.PNG

Melden Sie sich an, um zu kommentieren.

Antworten (1)

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

Kategorien

Mehr zu Tables finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by