Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
How can I convert a matrix to all numeric values which contains numeric and characters both?
조회 수: 1 (최근 30일)
이전 댓글 표시
I have matrix containing both numerics and characters(actually NaNs) values both. How to convert this matrix so that it contains all the numeric values?Because I want to write this matrix to an excel sheet.
답변 (1개)
Rik
2018년 8월 9일
If you want to replace the NaNs by 0, you can simply use this:
data(isnan(data))=0;
댓글 수: 4
Rik
2018년 8월 12일
If your variable data is a matrix that is not a logical, this code will not return a logical. What exact code are you using? Try to reduce it to a small piece of code I can run to replicate your issue.
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!