Reading CSV file within Matlab exe gives unexpected result
3 次查看(过去 30 天)
显示 更早的评论
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
2023-11-27
Hi @Yazan
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.
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Environment and Settings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!