Filter löschen
Filter löschen

Find value in one row that corresponds to value within another row in the same table column

7 Ansichten (letzte 30 Tage)
Hi,
I have a table with 2 rows and 4 columns
I want to find the value in row 2 that corresponds to the value e.g. '3' in row 1 in the same column
Thanks a bunch

Akzeptierte Antwort

Cris LaPierre
Cris LaPierre am 23 Mär. 2023
T = table([1;2],[2;4],[3;6],[4;8])
T = 2×4 table
Var1 Var2 Var3 Var4 ____ ____ ____ ____ 1 2 3 4 2 4 6 8
T(2,T{1,:}==3)
ans = table
Var3 ____ 6

Weitere Antworten (0)

Kategorien

Mehr zu Tables finden Sie in Help Center und File Exchange

Produkte


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by