- NaN — double, single, duration, and calendarDuration
- NaT — datetime
- <missing> — string
- <undefined> — categorical
- {''} — cell of character vectors
Removing rows with empty values in table
23 次查看(过去 30 天)
显示 更早的评论
Hello! I have the table attached ('egAllHitMov') which has missing values in the first 6393 rows showing as []. I tried the following line to remove them:
AllHitMov = rmmissing(AllHitMov);
But it does not work, and also does not give me an error. Do you know how I can create a new table without these lines?
Thank you!
0 个评论
采纳的回答
Cris LaPierre
2022-9-26
Empty is not a recognized missing value in MATLAB, so rmmissing does nothing.
Missing values are defined according to the data type of A:
I think the easiest way to do what you want is to convert your values from empty cell arrays to doubles. That automatically removes the empty rows.
AllHitMov = varfun(@cell2mat,AllHitMov);
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!