how to write data to xls sheet?
이전 댓글 표시
value_F = 0.1,0.2,0.3,0.4,0.5,0.6
filename = 'C:\Documents and Settings\admin\Desktop\test.xlsx';
value_F
Data= {'value_F';value_F};
sheet = 1;
xlRange = 'B';
xlswrite(filename,Data,sheet,xlRange)
where value_F is calculated from simulink model and asiigned to workspace,,,am able write oly value_F,,,am unable to write all the values of value_F
댓글 수: 1
nehad mohamed
2021년 1월 17일
how to write all value for F every value in cell in sheet
채택된 답변
추가 답변 (3개)
If there're both CHAR data and DOUBLE data, I prefer to use XLSWRITE twice to make it work without extra effort. Here I assume value_F is a double matrix.
xlswrite(filename,data(1),1,'A1');
xlswrite(filename,data{2},1,'A2');
댓글 수: 3
Arun Badigannavar
2013년 1월 24일
Jing
2013년 1월 24일
Just use the code I provided above, it can do that, just write twice...
Arun Badigannavar
2013년 1월 25일
Sachin Ganjare
2013년 1월 24일
0 개 추천
Check the type of workspace output variable using "whos ,var_name". It could be a problem with type of data being written in excel.
댓글 수: 1
Arun Badigannavar
2013년 1월 24일
카테고리
도움말 센터 및 File Exchange에서 Gaussian Process Regression에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!