Removing a particular column from multiple large datasets.
이전 댓글 표시
I am importing multiple large datasets to carry out analysis. One of the columns in each imported file is preventing me from analysis carrying out analysis.
I want to remove that column (In my case it's column 1) from all of the datasets. Multiple files are being imported at once using a test list.
for i = length(testlist.data)
DataIn1 = importdata([FolderINPUT1 '\' FilesList1(testlist.data(i,1)).name], '\t' );
end
I want to remove all of column 1 for every file which has been imported, can anyone help me with this?
답변 (1개)
KSSV
2020년 10월 12일
If A is your matrix....to remove first column.
A(:,1) = [] ;
댓글 수: 8
Eoin Lyden
2020년 10월 12일
Eoin Lyden
2020년 10월 12일
KSSV
2020년 10월 12일
Attach one text file here or attach the data DataIn1. It seems you are not getting a matrix.
Eoin Lyden
2020년 10월 12일
KSSV
2020년 10월 12일
data = importdata(myfile) ;
data = data.data ;
data(:,1) = [] ;
Eoin Lyden
2020년 10월 12일
KSSV
2020년 10월 12일
Can you tell ...how
data = importdata(myfile) ;
looks like?
Also read about readmatrix, textscan.
Eoin Lyden
2020년 10월 12일
카테고리
도움말 센터 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!