필터 지우기
필터 지우기

how to delete rows from a struct array?

조회 수: 3 (최근 30일)
Abdelmalek Benaimeur
Abdelmalek Benaimeur 2019년 3월 7일
답변: Bob Thompson 2019년 3월 7일
hello folks I have this struct array as shown bellow i'd like to delete all the rows where class is not 'double', so i'm wondering how to ? anyone can help !!!
Sans titre.png

답변 (1개)

Bob Thompson
Bob Thompson 2019년 3월 7일
vars = vars([vars.class] == 'double');
This may not work exactly (I think you might need to use strcmp instead of ==, but it should get you going.

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by