when char(65) then A.
조회 수: 2 (최근 30일)
이전 댓글 표시
but when we define A='5', then char(5) can not be the result A. how can we get this value?
댓글 수: 0
답변 (2개)
Star Strider
2015년 4월 17일
You have defined ‘A’ as a string, so it will remain so. If you want to find the numeric value (5) you assigned to ‘A’, you would have to use the str2num or similar funcitons:
A = '5';
a = str2num(A)
produces:
a =
5.0000e+000
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 String에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!