How to output a large matrix to one excel with multiple sheets in specific size?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Hello,
I have a large matrix (289x46) which are x and y data. The first 289x23 are x data, and the rest 289x23 are y data. I want to export each column of x and y from the matrix to one sheet in excel, move to the next column of x and y, output again ans so on. Therefor I can have 23 sheets after output. How can I make this happen?
Thank you.
0 Commenti
Risposta accettata
Voss
il 25 Apr 2022
Modificato: Voss
il 26 Apr 2022
% a 289x52 matrix:
xy = readmatrix('test100_4.4.22cellsmeetcriteria.xlsx');
% write each pair of columns (one x and one y)
% to a sheet of output.xlsx, for the first 23 pairs:
for ii = 1:23
writematrix([xy(:,ii) xy(:,ii+23)],'output.xlsx','Sheet',ii);
end
4 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Spreadsheets in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!