Hi!
I have a cell array like the following:
I want to put each matrix of row 2 in one spreed sheet named as text in row 1. Been trying but don't not know to do it.
Thanks

 Akzeptierte Antwort

Stephen23
Stephen23 am 7 Apr. 2022

1 Stimme

Where C is your cell array:
F = 'myfile.xlsx';
for k = 1:size(C,2)
T = C{1,k};
M = C{2,k};
writematrix(M, F, 'Sheet',T)
end

2 Kommentare

Valeria AS
Valeria AS am 7 Apr. 2022
Awesome!!
It works very well, thanks so much, Stephen!
Stephen23
Stephen23 am 7 Apr. 2022
@Valeria AS: if it helped you, please remember to accept my answer :)

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Community Treasure Hunt

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

Start Hunting!

Translated by