Reading CSV file within Matlab exe gives unexpected result

조회 수: 2 (최근 30일)
Yazan
Yazan 2023년 11월 21일
답변: Yazan 2023년 12월 10일
Hello,
I have a Matlab script that I want to compile into a standalone exe. The script reads a CSV file (the path to which is input from the user). It uses readtable with options coming from detectImportOptions. Everything is OK in the script, but when compiled, the CSV file is not read properly. I could track that and saw that the import options are very different compared to those that I get when I execute the script within Matlab.
Is this a well-known issue? Any proposals to go around it?
  댓글 수: 2
Jeremy Hughes
Jeremy Hughes 2023년 11월 27일
Without a file or code to look at, it's really hard to say anything at all about what you should expect.
Remember that detectImportOptions generates options based on the input file being passed in. If the files are not the same, you may not see the same options being generated. Even subtle differences in files can result in different options, especially for smaller files.
Some differences might also result depending on the locale settings where the code is executed if the data contains dates.
Yazan
Yazan 2023년 12월 9일
편집: Yazan 2023년 12월 9일
Thanks for the reply, and sorry for coming back late to this question. My problem was solved by decrypting the CSV files before being used by the Matlab exe (the files were encrypted).

댓글을 달려면 로그인하십시오.

채택된 답변

Yazan
Yazan 2023년 12월 10일
Problem was solved by decrypting the CSV files before being used by the Matlab exe (the files were encrypted).

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by