what str2num will perform?
조회 수: 1 (최근 30일)
이전 댓글 표시
fid = fopen(txtfile,'r');
tline = fgetl(fid);
index = findstr(tline,'.');
i = i+1;
filenames(i) = str2num(tline(1:index-1))+1;
what is the function of str2num here? I am not getting clear with the mathwork help. Can anyone explain in brief?
댓글 수: 2
Rik
2018년 11월 13일
As the documentation mentions, str2num uses eval and might thus have unintended side effects, which you can avoid by using str2double. In most cases these two functions should be equivalent.
답변 (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!