필터 지우기
필터 지우기

Delete a row of a cell containing a certain number

조회 수: 1 (최근 30일)
Eli Dim
Eli Dim 2015년 7월 16일
댓글: Azzi Abdelmalek 2015년 7월 16일
I have a large cell array (a part of it I attached). This cell array contains other cells. My problem occurs at rows with contents similar to sequence{28,1} where I have zeros or numbers close to zero in the second column. How can I delete all rows which contain a number less than 0.001 in the second column. The numbers in the second column are cells themselves and the letters in the first columns are cells of characters.

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2015년 7월 16일
편집: Azzi Abdelmalek 2015년 7월 16일
A=A(A(:,2)>=0.001)
  댓글 수: 4
Eli Dim
Eli Dim 2015년 7월 16일
Thank you, this works perfectly, but can you explain to me what the syntax means?
Azzi Abdelmalek
Azzi Abdelmalek 2015년 7월 16일
Cellfun allows you to apply any function you want to each cell. It's like a for loop, where x represent each cell at each increment. Read the Documentation

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by