Borrar filtros
Borrar filtros

How to write data from matlab to excel horizontally?

1 visualización (últimos 30 días)
Saad
Saad el 28 de Jul. de 2014
Comentada: Saad el 28 de Jul. de 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

Respuesta aceptada

Joseph Cheng
Joseph Cheng el 28 de Jul. de 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.

Más respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by