File processing dat file returns error
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I have a dat file iris.dat containing Iris dataset. I wants to remove fifth column from the file by using the code below. But i received error "Variable index exceeds table dimensions". data variable in workspace shows 0x0 table. How to get rid off the error? I tried to upload the dat file here, but the MathWorks site not supported. I have attached the ss of what the dat file contains.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1627488/image.jpeg)
filename = 'iris.dat';
data = readtable(filename, 'Delimiter', ',');
% Remove the fifth column
data(:, 5) = [];
1 Kommentar
Antworten (1)
Siehe auch
Kategorien
Mehr zu Standard File Formats finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!