Export Matrix into Excel or Text

1 回表示 (過去 30 日間)
Mayrin Mejia
Mayrin Mejia 2021 年 3 月 21 日
回答済み: Walter Roberson 2021 年 3 月 21 日
I have a matrix I've been trying to export to either excel or txt. I converted it from syms to char first because I would get error if i left it as syms. The output matrix is super long and starts as cos((theta*pi)/180)^2*(cos((theta*pi)/180)^2/(E11*(2*cos((theta*pi)/180). When I trid exporting it to excel, it was all placed in one cell and its a 3 x 3 matrix. How do i export it so it's all separated
Sbar = char(GlobalReducedCompliance(E11, E22, nu12, G12, theta));
writematrix(Sbar,'sbar.xlsx')

回答 (1 件)

Walter Roberson
Walter Roberson 2021 年 3 月 21 日
Sbar = cellfun(@char, GlobalReducedCompliance(E11, E22, nu12, G12, theta), 'uniform', 0);
writecell(Sbar, 'sbar.xlsx');

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by