フィルターのクリア

Writing results in excel from matlab

1 回表示 (過去 30 日間)
Ananya Malik
Ananya Malik 2017 年 3 月 30 日
コメント済み: Ananya Malik 2017 年 3 月 30 日
I need to write a string value in an excel cell, followed by array values of A and B (each value in a different cell) like in the figure. But when I try the following code, only string is written and numeric values are lost. Any help appreciated.
function_name = 'F2';
A={[1 2 3 4]};
B= {[ 5 6 7 8]};
filename = 'testtest.xlsx';
xlswrite(filename,[{Function_name},A B])

採用された回答

KSSV
KSSV 2017 年 3 月 30 日
F = 'F2';
A=[1 2 3 4];
B= [ 5 6 7 8];
filename = 'testtest.xlsx';
xlswrite(filename,[{F} num2cell(A) num2cell(B)])
  1 件のコメント
Ananya Malik
Ananya Malik 2017 年 3 月 30 日
Thanks a lot..

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

その他の回答 (0 件)

カテゴリ

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