Replace comma with dot after fopen
이전 댓글 표시
Hello everyone,
I am having some problems with Matlab.
I import a txt file with fopen and, after imported, I want to convert the commas in the file with dots but I do not know how to do. I have searched between the answers in the Matlab Central but I have found nothing.
Thank you for the help.
댓글 수: 4
KSSV
2021년 10월 19일
Read about strrep.
Stephen23
2021년 10월 19일
"I have searched between the answers in the Matlab Central but I have found nothing"
Here are 339 results, many of which are related to file importing:
Daniele Sonaglioni
2021년 10월 19일
Daniele Sonaglioni
2021년 10월 19일
채택된 답변
추가 답변 (1개)
fnm = 'trial_file.txt';
opt = detectImportOptions(fnm, 'VariableNamesLine',9, 'VariableUnitsLine',10, 'DecimalSeparator',',', 'ExtraColumnsRule','ignore');
opt.DataLines = [11,Inf];
tbl = readtable(fnm, opt)
카테고리
도움말 센터 및 File Exchange에서 Data Import and Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!