Insert blank cells in a matrix
조회 수: 54 (최근 30일)
이전 댓글 표시
How can I replace all the NaN values of a matrix with a blank space?
댓글 수: 0
채택된 답변
Walter Roberson
2021년 11월 30일
You cannot do that. Numeric matrices cannot have spaces in them.
You can convert the matrix into a cell array and put spaces into the cell array... but it is not clear why you would do that.
myCell = num2cell(MyMatrix);
myCell(isnan(MyMatrix)) = {' '}; %nan -> space
Now what?
댓글 수: 12
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Type Conversion에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!