Changing a string to a number
이전 댓글 표시
I have a table that contains both numerical values as well as text. I would like to replace the string 'N/A' to the number 0 in the table.
Thanks for helping out a true beginner.
답변 (1개)
Azzi Abdelmalek
2014년 2월 5일
A={1 2 'N/A';3 'B' 5;'N/A' 0 0} %Example
A(strcmp(A,'N/A'))={0}
카테고리
도움말 센터 및 File Exchange에서 Characters and Strings에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!