Effacer les filtres
Effacer les filtres

Search Table for value using other variables

2 vues (au cours des 30 derniers jours)
Doug
Doug le 27 Mai 2020
Commenté : Doug le 28 Mai 2020
I am wanting to pull out and manipulate a value from the below table.
Using P1, P4 and P7 to output the value from P8.
Help would be appreciated with this issue.

Réponse acceptée

Cris LaPierre
Cris LaPierre le 28 Mai 2020
Modifié(e) : Cris LaPierre le 28 Mai 2020
ind = t.P1==48.3 & t.P4==16 & t.P7==44.79;
valP8 = t.P8(ind)
Of course you'll have to use the actual table and full variable names from your table.
  3 commentaires
Cris LaPierre
Cris LaPierre le 28 Mai 2020
t2.varName = t.P8;
Just keep in mind that t2 will have to have the same number of rows as t.
Doug
Doug le 28 Mai 2020
Thanks heaps Cris. Much appreciated.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Produits


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by