How can I remove this empty cell from my structure array?

I have this strucure array with an empy cell as a bracket and I am not sure how can I remove it.

답변 (1개)

BN
BN 2020년 4월 16일
Hi, In my opinion
Since you have a corresponding value for it in the next column, you can delete it, you can change it to the nan or you can delete the entire row.
You can delete the entire row using this:
numUniqueWords(1) = [];

댓글 수: 2

Thank you.
Stephen23
Stephen23 2020년 4월 16일
편집: Stephen23 2020년 4월 16일
"...or you can delete the entire row."
The complete structure only has one row (its size is clearly shown in the screenshot as 1x305), so removing the "entire row" would delete all elements of the structure, leaving a completely empty structure.
The answer deletes the first element of the structure, which is also its first column (not row).

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Structures에 대해 자세히 알아보기

태그

질문:

2020년 4월 16일

편집:

2020년 4월 16일

Community Treasure Hunt

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

Start Hunting!

Translated by