exporting from matlab to excel

2 ビュー (過去 30 日間)
joseph Frank
joseph Frank 2013 年 7 月 14 日
I have 236 vectors and arrays named A, B, C.....etc... Some of them are cell arrays and some of them are double vectors. How can I export the data to excel in one sheet where the order of variables is alphabetical? mixing arrays and vectors are a challenge to me as well as exporting them alphabetically in one sheet.
  2 件のコメント
Azzi Abdelmalek
Azzi Abdelmalek 2013 年 7 月 14 日
What is the size of these cell arrays ?
joseph Frank
joseph Frank 2013 年 7 月 24 日
Each vector or array is 140 rows

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

採用された回答

Narges M
Narges M 2013 年 7 月 24 日
編集済み: Narges M 2013 年 7 月 24 日
use this example:
A = {1;2;3;4};
B = [9;8;7;6];
C = {5;6;7;8};
D = [5;4;3;2];
for i='A':'D'
eval(sprintf('last = length(%s);', i));
eval(sprintf('xlswrite(''C:\\test.xls'',%s,1,''%s1: %s%d'');',i,i,i,last));
end

その他の回答 (1 件)

Darin McCoy
Darin McCoy 2013 年 7 月 15 日
I recommend creating sample data so users can mess with what you're working with

カテゴリ

Help Center および File ExchangeSpreadsheets についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by