Filter löschen
Filter löschen

How to write data from matlab to excel horizontally?

1 Ansicht (letzte 30 Tage)
Saad
Saad am 28 Jul. 2014
Kommentiert: Saad am 28 Jul. 2014
Dear all,
Please any advice on this is much appreciated.
If i use this command:
xlswrite('xxxtrice.xlsx', output, 'Sheet1', 'G2');
Then the data in excel will show like this: G2, G3, G4 etc
However I would like the data to appear in excel like this: G2, H2, I2
The size of output changes all the times so I cannot specify the range of G2 easily.
Any help is welcome
Regards
S

Akzeptierte Antwort

Joseph Cheng
Joseph Cheng am 28 Jul. 2014
What you would need to to is make the output a 1x3 array. i'm assuming that the output is a 3 row and 1 column array?
if i did a test like this
x = randi(10,1,10);
xlswrite('book1.xls',x,'sheet1','G10')
i get it across the columns
if i do
x = randi(10,10,1);
xlswrite('book1.xls',x,'sheet1','G10')
i get it just down column G.

Weitere Antworten (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by