datastore won't read variable names
2 ビュー (過去 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!