필터 지우기
필터 지우기

How to delete an entire row in a cell array based on the occurrence of a character in one column?

조회 수: 1 (최근 30일)
This array has 3 columns. Values in column 1 change, but some of the cells contain '*' along with other numbers. The other numbers are never the same. How can I remove the entire row based on the nonoccurence of * in the first cell?
i.e.) myArray =
{'1*3', 100, 1
'2*4', 200, 3
'1*7', 400, 4}
etc.

채택된 답변

Sean de Wolski
Sean de Wolski 2018년 7월 30일
c2 = c(~contains(c(:,1),'*'),:)

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by