필터 지우기
필터 지우기

How to write data from matlab to excel horizontally?

조회 수: 1 (최근 30일)
Saad
Saad 2014년 7월 28일
댓글: Saad 2014년 7월 28일
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

채택된 답변

Joseph Cheng
Joseph Cheng 2014년 7월 28일
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.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by