How to find specific value in a table

12 ビュー (過去 30 日間)
Juan Camilo de la Cruz Alzate
Juan Camilo de la Cruz Alzate 2020 年 5 月 21 日
II'm doing a thermodynamics homework and i need to extrac de values of heat capacity from to a table, but i need find them searching the name of the chemical specie.
my problem it's when i need search the Cp values of water writing the water molecular formula (ex: H2O), how i to find it without literaly copy the values from the table?

採用された回答

KSSV
KSSV 2020 年 5 月 21 日
You canget the index where it lies using strfind. Let T be your table.
idx = strfind(T.Formula,'H2O') ; % logical index
id = find(idx) ; % index
val = T.A(idx)
  1 件のコメント
VISHNU DIVAKARAN PILLAI
VISHNU DIVAKARAN PILLAI 2022 年 1 月 10 日
i have a table name 'dcode'
d={':';'M';'D';'MD';'A';'AM';'AD';'AMD'};
d_address={'000';'001';'010';'011';'100';'101';'110';'111'};
dcode=table(d,d_address);
i would like access the equivalent value of 'D' in column 1 from column 2 .
( if i search the value for D i need to get ans as 010 from column 2)
can u please help me how to do it.
thanks in advance

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeThermodynamics and Heat Transfer についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by