How to read .csv files in MATLAB 2019a?
1 回表示 (過去 30 日間)
古いコメントを表示
Sorry,
I have a problem with a command. In Matlab version 2015a I used to use commands
filename1= 'B_STAT.xlsx'
[d1,tex]= xlsread(filename1);
REAL_B=d1(:,3);
REAL_B=d1(:,4);
in order to open a file and separate columns. In 2019a version I am not allowded to use these commands: In command window shows me that : "Error in line 2"
Could someone help me in order to fix my problem?
0 件のコメント
採用された回答
Walter Roberson
2019 年 12 月 23 日
Those are still valid commands in MATLAB.
However if you do not happen to be using MS Windows with Excel installed, then you would get a warning that "Basic" mode would be used, and it would try to find B_STAT.csv which probably does not exist.
You can use
d1 = readtable(filename1);
to do the reading. You might need
d1 = readtable(filename1, 'readvariablenames', false);
The result either way would be a table() object, and then
REAL_B = d1{:,3};
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Files and Folders についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!