Read/Write CSV for Code Generation
24 views (last 30 days)
Is there a good way to read and/or write CSV files that is supported for code generation. I'd rather not write my own function but my searching leads me to believe that I am going to have to do this. Hopefully I am wrong.
For any Mathworks folks reading this question, if this isn't supported it should be (readmatix.m, readtable.m, etc.) on a future release.
FannoFlow on 17 May 2023
To my knowledge, this does not exist.
And more specifically, I don't know how it could exist. The internal data of a csv could be anything, any size, and any length, and therefore not type safe enough for code generation.
I would recommend something like the following:
More Answers (1)
Allen on 17 May 2023
There are a number of options for reading CSV files. The following functions are few that I use and differ many in the type of workspace variable that you want after importing the data.
Here are a few of the inverse options for writing to file.