How to access the specific value in table according to the input parameters?
1 回表示 (過去 30 日間)
古いコメントを表示
Konstantin Tkachuk
2019 年 2 月 20 日
コメント済み: Konstantin Tkachuk
2019 年 2 月 20 日
I am working with SQL database and convert it to matlab table using
results = fetch(conn,sqlquery);
LCA_Database = cell2table(results);
LCA_Database looks like this:


My question is how can I access the data stored in for example 11 column pentr according to the input parameters: Name == 'Construction Steel' and lca_phase == 'D' ?
I cannot change the rows and columns as all database is structured like that. AS well I cannot assign the rownames to the name of material as it remains the same for 5 rows and matlab do not allow me to do that.
Can I create new table out of this table with automatic assignment of rownames that will contain name of the material + lca_phase?
0 件のコメント
採用された回答
madhan ravi
2019 年 2 月 20 日
LCA_Database(contains(LCA_Database.Name,'Construction Steel')&contains(LCA_Database.lca_phase,'D'),:)
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Database Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!