필터 지우기
필터 지우기

How to remove rows in a cell array?

조회 수: 4 (최근 30일)
Behrooz Daneshian
Behrooz Daneshian 2023년 1월 27일
답변: Sulaymon Eshkabilov 2023년 1월 27일
Hi all,
I have a cell array called "stations1". I want to remove any row for which column 9 is empty ([]). Can anyone one help me with that?

채택된 답변

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2023년 1월 27일
Here is how you can do it:
load('stations1.mat');
[Rs, Cs] = find(cellfun(@isempty, stations1));
stations1(Rs,:)=[];

추가 답변 (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