Printing specific rows based on column from excel

Good Day,
I have an excel sheet with 7296 rows and 9 columns. So, I want to get certain rows only based on the column value. For example:
Time Node FaceID FaceDescr Type Packets Kilobytes PacketsRaw KiloBytesRaw
Like the above snippet I have certain rows with the FaceDesc 'ALL' as one of the columns. So, I want my code to print only those rows. I have some unecessary rows that I don't want the code to print like the below screenshot shows. Can anyone please nudge towards the right direction of getting what I need? I'm new to MatLab. Thank you.

 採用された回答

KSSV
KSSV 2022 年 4 月 11 日

0 投票

T = readtable(myfile) ;
idx = matches(T.FaceDescr,'all') ;
T(idx,:)

4 件のコメント

Sai Gautam Mandapati
Sai Gautam Mandapati 2022 年 4 月 11 日
Thank you so much! Works perfectly.
Sai Gautam Mandapati
Sai Gautam Mandapati 2022 年 4 月 11 日
@KSSV For suppose, If I want my code to print all the rows under FaceDescr:'appFace:// ' and Type: 'InInterests'. How can I do that?
KSSV
KSSV 2022 年 4 月 12 日
Get indices of each column and use logical and.
Sai Gautam Mandapati
Sai Gautam Mandapati 2022 年 4 月 12 日
Thank you!

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeData Import from MATLAB についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by