File processing dat file returns error
조회 수: 1 (최근 30일)
이전 댓글 표시
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
답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Database Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!