Effacer les filtres
Effacer les filtres

How to select and write values from data into excel

1 vue (au cours des 30 derniers jours)
Arslan F
Arslan F le 23 Fév 2017
Commenté : Arslan F le 26 Fév 2017
I have a single column of 98820 values i want to divide them into groups of 4941 and write them in separate columns in excel

Réponse acceptée

Jan
Jan le 23 Fév 2017
x = rand(98820, 1);
y = reshape(x, 4941, 20);
xlswrite(FileName, y);
  3 commentaires
Image Analyst
Image Analyst le 25 Fév 2017
Correct (though this more general question wasn't asked). If the vector is not an integer multiple of the number in a group, then Arslan should choose a different group size or else re-think what he wants to do. For the stated numbers, this works.
Arslan F
Arslan F le 26 Fév 2017
98820/4941 is an integer its 20 (its not 98829)

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by