Import Data Tool Code
조회 수: 7 (최근 30일)
이전 댓글 표시
Hi,
I Have been using the Import Data Tool to import data from a txt file to an array.
I want to get this operation into a code i try to use the uiimport(FileName) But i got the following error:
Error using importdata (line 228)
Unable to load file.
Use readtable for more complex formats.
Error in uiimport/runImportdata (line 531)
importdata(fileAbsolutePath);
Error in uiimport/gatherFilePreviewData (line 473)
[datastruct, textDelimiter, headerLines]=
runImportdata(fileAbsolutePath, type);
Error in uiimport (line 297)
gatherFilePreviewData(fileAbsolutePath);
Caused by:
Index exceeds the number of array elements (1).
I would really appreciate your assistance,
Shany.
댓글 수: 0
채택된 답변
Cris LaPierre
2021년 2월 8일
편집: Cris LaPierre
2021년 2월 8일
Is fileAbsolutePath the name of your text file? If so, try the following.
uiimport('fileAbsolutePath.txt')
If you want the Import Tool to generate code for importing the file based on the current settings, use the expanded options under "Import Selection". This video from our Exporatory Data Analysis with MATLAB course shows you how.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Large Files and Big Data에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!