To delete the empty fields in the dataset
이전 댓글 표시
Dear all, Could you please help me that I faced the difficulty to do the data set to be tidy up? I want to delete the empty fields in the data set. The data set(53x2 cell array) is below;
[1x18 struct] []
[1x18 struct] []
[1x18 struct] []
[1x18 struct] []
[1x18 struct] []
[1x18 struct] [1x18 struct]
[] []
[1x18 struct] [1x18 struct]
[1x18 struct] []
[1x18 struct] []
[1x18 struct] []
[1x18 struct] []
[1x18 struct] []
[1x18 struct] []
[] []
[1x18 struct] []
[1x18 struct] []
[1x18 struct] []
[1x18 struct] [1x18 struct]
[] []
[1x18 struct] []
[] []
[1x18 struct] []
[] []
[] []
[1x18 struct] []
[1x18 struct] []
[1x18 struct] []
[1x18 struct] []
[1x18 struct] []
[1x18 struct] [1x18 struct]
[1x18 struct] []
[] []
[1x18 struct] []
[] []
[1x18 struct] []
[1x18 struct] []
[1x18 struct] []
[1x18 struct] [1x18 struct]
[1x18 struct] []
[1x18 struct] [1x18 struct]
[1x18 struct] []
[] []
[1x18 struct] []
[1x18 struct] []
[1x18 struct] []
[1x18 struct] []
[1x18 struct] []
[1x18 struct] []
[1x18 struct] []
[1x18 struct] []
[] []
[1x18 struct] [1x18 struct]
댓글 수: 2
Azzi Abdelmalek
2016년 4월 27일
Is it a cell array or what? What is its size? do you mean to delete the entire row?
Khaing Zin Htwe
2016년 4월 27일
채택된 답변
추가 답변 (1개)
Elias Gule
2016년 4월 29일
Now, try this
V = {1,2,[],[],23,16,'A',struct()}; % your cell array
V = V(~cellfun('isempty'),V);
댓글 수: 2
Khaing Zin Htwe
2016년 5월 1일
Elias Gule
2016년 5월 9일
Plz replace
V = V(~cellfun('isempty'),V);
with
V = V(~cellfun('isempty',V));
카테고리
도움말 센터 및 File Exchange에서 Structures에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!