매트랩에서 한글이 들어있는 csv 파일을 로드하는 과정에서 NaN값으로 바뀌는 문제가 있습니다. 어떻게 해결하나요?
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
현재 야구 데이터를 이용한 시뮬레이터를 제작하기 위해 데이터를 csv 파일로 받아와서 readmatrix 함수에서 FileType='text', Encoding='UTF-8'로 설정하여 로드하였습니다. 그런데 지속적으로 한글 부분이 NaN값으로 바뀌어서 들어오는데 어떡하면 될까요?
0 Commenti
Risposte (1)
Kyoung Moon Lee
il 17 Giu 2024
Modificato: Kyoung Moon Lee
il 17 Giu 2024
readmtrix를 사용할 때, 숫자형 데이터와 텍스트 데이터가 혼합된 파일의 경우 readmatrix는 기본적으로 데이터를 숫자형 배열로 가져옵니다.
출처: https://kr.mathworks.com/help/matlab/ref/readmatrix.html
readmatrix 함수는 파일에 포함된 텍스트를 ascii로 변환하거나 Nan 값으로 읽어줍니다.
따라서 일정한 형태를 가진 파일이라면 textread 함수 사용을 추천드립니다.
0 Commenti
Vedere anche
Categorie
Scopri di più su 텍스트 파일 in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!