Can I extract data from excel filtering a specific search word and its associated value on the next column?
5 ビュー (過去 30 日間)
古いコメントを表示
Karla Haiat
2018 年 1 月 15 日
コメント済み: Srikanth Reddy Pyata
2023 年 6 月 12 日
Hello. I have an excel sheet and there is a column with different names of data, for example my column can have O2, oxygen or iron. the next column has actual number values. I know on excel you can filter your column to only show "O2" for example. Is there a way to do this with Matlab? I want to extract all the values on the column next to the names but only the values that match "O2"
0 件のコメント
採用された回答
Emmanouil Tzorakoleftherakis
2018 年 1 月 24 日
Hi Karla,
You can do this by proper indexing of the columns. Please see code sample below:
data = {'O2', 5;'oxygen', 3;'iron', 2};
filtered = data(strcmp(data(:,1),'O2'), 2)
1 件のコメント
Srikanth Reddy Pyata
2023 年 6 月 12 日
Can you add input and output format so that it is more readable
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Data Import from MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!