Why is data being imported improperly into the Simulink Data Inspector from my CSV file?
조회 수: 3 (최근 30일)
이전 댓글 표시
MathWorks Support Team
2023년 5월 30일
답변: MathWorks Support Team
2023년 6월 1일
I'm trying to import data into the Simulink Data Inspector from a CSV file in MATLAB R2019a, but I'm observing some weird behavior. The file I'm trying to load has two columns: time and signal values. Below is an example of what my CSV file looks like.

When I try to load the data in, it reads each entry as a signal rather than each column.
채택된 답변
MathWorks Support Team
2023년 5월 30일
This behavior may happen if you are saving the XLSX as CSV on a Mac / Linux machine. MS Excel has the option to save XLSX as CSV with 4 different options. They are CSV, CSV UTF-8, CSV (Macintosh) and CSV (MS-DOS). The unexpected behavior is only observed when the file is saved as CSV (Macintosh). The expected behavior is observed with any of the other 3 formats. As a workaround, you should use any of the other 3 options for saving the file as CSV.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Spreadsheets에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!