datastore won't read variable names
13 次查看(过去 30 天)
显示 更早的评论
Hi,
I'm trying to read data from a large csv file using matlab 2020a.
However, the variable names aren't read and I get 'Var_1', 'Var_2' etc. as the variable names.
How can I make it read the variable names?
Thanks
____
EDIT: The problem was the 'NumHeaderLines' property. It was automatically set to 1 when it should have been set to 0.
0 个评论
回答(1 个)
Ameer Hamza
2020-9-21
Use PreserveVariableNames options
ds = datastore('filename', 'PreserveVariableNames', true)
3 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Workspace Variables and MAT Files 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!