フィルターのクリア

Export data from MATLAB to Excel

2 ビュー (過去 30 日間)
ghazale
ghazale 2013 年 5 月 2 日
I want to export my data from MATLAB to Excel, I now the Excel write code, just I want to organiye data in Excel by Matlab. I have 3 columns that they don't have the same number of rows, I want to put them near each other with a gap in between.like :
Time Rate Temp
12 23 543
13 32 3
43 432 435
123 23 2
23423 234234
23
Is it possible?
Thanks
[EDITED, Jan, table formatted]
  2 件のコメント
Jan
Jan 2013 年 5 月 2 日
編集済み: Jan 2013 年 5 月 2 日
I'm not sure if I understand you correctly. You know how to write the data in Excel. Then what is the problem? Where is the "gap"?
Zhang lu
Zhang lu 2013 年 5 月 2 日
編集済み: Zhang lu 2013 年 5 月 2 日
Hi
xlswrite('a.xls',{'Time'},'sheet1','A1'); xlswrite('a.xls',{'Rate'},'sheet1','B1'); xlswrite('a.xls',{'Temp'},'sheet1','C1'); xlswrite('a.xls',Time,'A2:A5'); xlswrite('a.xls',Rate,'B2:B6'); xlswrite('a.xls',Temp,'C2:C7');

サインインしてコメントする。

回答 (1 件)

Habib
Habib 2013 年 5 月 2 日
after you have your vectors calculated as below:
R1=your_time_vector; % here[12; 13; 43; 123]
R2=your_rate_vector;
R3=your_temp_vector;
you create a header vector:
R0={'Time' , 'Rate' ,'Temp'};
and then export your results to Results.xlsx as below:
xlswrite('Results.xlsx', R0,'Sheet1','A1');
xlswrite('Results.xlsx', R1,'Sheet1','A2');
xlswrite('Results.xlsx', R2,'Sheet1','B2');
xlswrite('Results.xlsx', R3,'Sheet1','C2');

カテゴリ

Help Center および File ExchangeData Import from MATLAB についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by