Hello everyone,
I recently started working with MATLAB and have to write a script reading out an excel file and creating a new one with only some specific columns and rows of the previous excel file.
I am encountering a problem with deleting rows in a specific column. The idea is that each row in a column named "TriggerHint" with a value > 15 is being disregarded in the new excel file.
The only things I came up with so far ar either
rows_TriggerHint= pp.TriggerHint<16
or
index=ismember(data_pp.TriggerHint, > 15)
which both don't work.
Thank you in advance!
Luisa

 채택된 답변

Stephan
Stephan 2020년 11월 17일

0 개 추천

Download the attached file - and copy it in your working directory:
T = readtable('TriggerHintExample.xlsx')
T(T.TriggerHint > 15,:) = []
writetable(T,'myNewFile.xlsx')

댓글 수: 1

Lui Sa
Lui Sa 2020년 11월 17일
Thank you very much for your help, Stephan. With your code the script worked now!
Best wishes,
Luisa

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

제품

릴리스

R2020b

태그

질문:

2020년 11월 17일

댓글:

2020년 11월 17일

Community Treasure Hunt

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

Start Hunting!

Translated by