Filter löschen
Filter löschen

identify rows with [] within a cell

2 Ansichten (letzte 30 Tage)
Alberto Acri
Alberto Acri am 2 Dez. 2023
Verschoben: Dyuman Joshi am 2 Dez. 2023
Hi! Is there any way to identify rows with [] within a cell? Something that is analogous to 'find'.
[rr,cc] = find(M(:,1) == []);

Akzeptierte Antwort

Dyuman Joshi
Dyuman Joshi am 2 Dez. 2023
Verschoben: Dyuman Joshi am 2 Dez. 2023
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

Weitere Antworten (0)

Kategorien

Mehr zu Matrices and Arrays finden Sie in Help Center und File Exchange

Produkte


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by