필터 지우기
필터 지우기

Printing specific rows based on column from excel

조회 수: 5 (최근 30일)
Sai Gautam Mandapati
Sai Gautam Mandapati 2022년 4월 11일
댓글: Sai Gautam Mandapati 2022년 4월 12일
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일
T = readtable(myfile) ;
idx = matches(T.FaceDescr,'all') ;
T(idx,:)
  댓글 수: 4
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개)

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by