I want to store two worksheets together in excel sheet from matlab.
2 次查看(过去 30 天)
显示 更早的评论
please help as I am only able to store only one worksheet at a time.
0 个评论
回答(1 个)
Azzi Abdelmalek
2012-11-21
a=rand(5)
b=rand(5)
xlswrite('filename.xls',a,'sh1')
xlswrite('filename.xls',b,'sh2')
4 个评论
Azzi Abdelmalek
2012-11-26
编辑:Azzi Abdelmalek
2012-11-26
You din'nt mention the sizes of your variables (number of lines and column of each variable). If your variables have the same number of lines you can concatenate them for example:
var1=rand(10,2);
var3=rand(10,4);
var3=rand(10,5;
data=[var1 var2 var3]
xlswrite('filename.xls',data)
If not, tell us what kind of data are you using?
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spreadsheets 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!