필터 지우기
필터 지우기

identify rows with [] within a cell

조회 수: 2 (최근 30일)
Alberto Acri
Alberto Acri 2023년 12월 2일
이동: Dyuman Joshi 2023년 12월 2일
Hi! Is there any way to identify rows with [] within a cell? Something that is analogous to 'find'.
[rr,cc] = find(M(:,1) == []);

채택된 답변

Dyuman Joshi
Dyuman Joshi 2023년 12월 2일
이동: Dyuman Joshi 2023년 12월 2일
You should use isempty for checking if an array (of any data type) is empty or not -
load('M.mat')
M
M = 6×1 cell array
{ 0×2 double} {36×2 double} {22×2 double} { 3×2 double} { 0×2 double} { 2×2 double}
cellfun('isempty', M)
ans = 6×1 logical array
1 0 0 0 1 0

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by