Need to initialize variables from a txt file
조회 수: 1 (최근 30일)
이전 댓글 표시
I have successfully imported data from a txt file with the following command:
%Importing Txt file into MATLAB
T = readtable('fueldata.txt');
This code created a data table with 5 columns of variables, Var1, Var2, Var3, Var4, Var5. I need to intialize all these variable columns with specfic names. For a xlsx file, I usually just say something like "Speed = filename.Var1" but cannot do that in this instance I believe. Any help would be appreciated. Thank you in advance!
댓글 수: 0
채택된 답변
Voss
2022년 5월 2일
T = readtable('fueldata.txt','VariableNames',{'put' 'your' 'variable' 'names' 'here'});
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Import and Export에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!