Get rid of array strings from readtable
정보
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
이전 댓글 표시
How do i get rid of the array strings on the "Precision" variable?

댓글 수: 0
답변 (1개)
Star Strider
2020년 9월 24일
Try this:
Precision = [{'91,6'}; {'91,1'}; {'90,4'}]; % Create Vector
T1 = table(Precision); % Create Table
T1.Precision = strrep(T1.Precision,',','.') % Necessary For Me (I Cannot Use ',' As Decimal Separator)
T1.Precision = str2double(T1.Precision) % Necessary
producing (nere):
T1 =
3×1 table
Precision
_________
91.6
91.1
90.4
.
댓글 수: 2
Jacob Rutgersson
2020년 9월 24일
Star Strider
2020년 9월 24일
I have no idea what sort of file ‘svenp’ is (text, spreadsheet, etc.). You can use detectImportOptions (and its friends), however in most situations I find it easier to just read the data in as strings or character arrays such as this, and then do the conversions.
이 질문은 마감되었습니다.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!