How do I write in different cell locations each time xlswrite function is executed in a for loop?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
How do I write in different cell locations each time xlswrite function is executed in a for loop?
0 commentaires
Réponse acceptée
Oleg Komarov
le 8 Fév 2011
Specify the range in Excel format:
xlswrite(filename, M, range)
An example (really basic, and optimizable):
for ii = 1:4
% Create random matrix
A = rand(ii);
% toplefts
toplefts = cumsum(0:ii-1)+1;
% Range
range = XLSrange(size(A),[toplefts(ii),1]);
xlswrite('C:\Users\Oleg\Desktop\trial.xlsx',A,'Sheet1',range)
end
Oleg
0 commentaires
Plus de réponses (1)
Voir également
Catégories
En savoir plus sur Spreadsheets dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!