Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
How to rejoin text and numbers into raw format and export to excel
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I have a excel file with data as shown,
Time Exp1 Exp2
0.1 26 965
0.2 23 966
0.3 25 963
0.4 NA 956
0.5 24 951
0.6 26 944
I have used the code
[num,text,raw] = xlsread('test.xlsx');
num_avg = fillmissing(num,'linear'); % to fill the missing data in the file
Now I want to write the processed data with the header to an excel file as shown below
Time Exp1 Exp2
0.1 26 965
0.2 23 966
0.3 25 963
0.4 24.5 956
0.5 24 951
0.6 26 944
How do I do it??
Thanks in advance
0 Kommentare
Antworten (1)
KSSV
am 13 Jun. 2018
str = {'Time' 'Exp1' 'Exp2'};
data = [0.1 26 965
0.2 23 966
0.3 25 963
0.4 24.5 956
0.5 24 951
0.6 26 944] ;
A = num2cell(data) ;
T = [str ; A] ;
xlswrite('check.xls',T)
5 Kommentare
KSSV
am 13 Jun. 2018
What is size of text1? YOu may trying adding header....as I have shown in the code, if you are getting error.
Diese Frage ist geschlossen.
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!