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

3 visualizzazioni (ultimi 30 giorni)
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

Risposta accettata

Cris LaPierre
Cris LaPierre il 23 Mar 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

Più risposte (0)

Categorie

Scopri di più su Tables in Help Center e File Exchange

Prodotti


Release

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by