how to load data and split into 3 columns from app.UITable to file csv

조회 수: 3 (최근 30일)
lyhoang nam
lyhoang nam 2021년 11월 4일
답변: Pratik 2024년 6월 11일
T=table(data);
app.UITable.Data=T;
filename='data.csv';
writetable(T,filename,'WriteRowNames', true);

답변 (1개)

Pratik
Pratik 2024년 6월 11일
Hi lyhoang,
As per my understanding, you want to load data and split into 3 columns from app.UITable to csv file.
Please refer to the following code snippet for the same:
% Assuming you have already loaded the data into a variable named T (from app.UITable)
% Split the data into three columns
column1 = T.Column1;
column2 = T.Column2;
column3 = T.Column3;
% Create a table with the split columns
splitTable = table(column1, column2, column3);
% Save the table to a CSV file
filename = 'data.csv';
writetable(splitTable, filename);
I hope this helps!

카테고리

Help CenterFile Exchange에서 Data Import and Analysis에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by