create table in .xlsx using appropriate function

A = [1, 2, 3; 4, 5, 6; 7, 8, 9];
B = [24, 35, 38; 21, 58, 36; 32, 56, 74];
% Combine matrices A and B
combinedMatrix = [A, B];
% Write the table to an Excel file
xlswrite('output.xlsx', combinedMatrix);
disp('Table written to output.xlsx');

回答 (1 件)

Cris LaPierre
Cris LaPierre 2024 年 1 月 9 日
編集済み: Cris LaPierre 2024 年 1 月 9 日

0 投票

Try using writematrix instead of xlswrite. It was introduced in R2019a (see Version History)
writematrix( combinedMatrix,'output.xlsx');

1 件のコメント

Dyuman Joshi
Dyuman Joshi 2024 年 1 月 9 日
Note - writematrix is available for R2019a and later versions.

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

質問済み:

2024 年 1 月 9 日

編集済み:

2024 年 1 月 9 日

Community Treasure Hunt

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

Start Hunting!

Translated by