I want to store two worksheets together in excel sheet from matlab.

Antworten (1)

a=rand(5)
b=rand(5)
xlswrite('filename.xls',a,'sh1')
xlswrite('filename.xls',b,'sh2')

4 Kommentare

Actually i want to store the results directly into Excel sheet and also if i want to store data in different columns of the same sheet then what should i do ? and I am not giving the data as you have given in a and in b . I only want the data to be stored directly from matlab to excel in the same sheet but in different columns. Thanx in advance.
The data I gave are just examples, How many variables do you have, are they same size? what are their sizes?
I WANT TO IMPORT THE ANSWER DIRECTLY FROM MATLAB INTO EXCEL .AND IN EXCEL ALSO I WANT TO STORE THE 191 VARIABLES (THEY ARE DIGITS,VALUES IN FIMTO FARADS,NANO HENRY ETC.) IN THE SAME SHEET BUT IN DIFFERENT COLUMN.THANX IN ADVANCE .
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?

Melden Sie sich an, um zu kommentieren.

Gefragt:

ria
am 21 Nov. 2012

Community Treasure Hunt

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

Start Hunting!

Translated by