filename = 'test.xlsx';
A = xlsread(filename,3,'A1476:D8676');
time = A(:,1);
x = A(:,2);
y = A(:,3);
z = A(:,4);
.......
........
T1=table(time,x,y,z);
T2=table(a,b,c);
T3=table(d,e,f);
fileName2='C:\Desktop\CODE.xlsx';
writetable(T1,fileName2,1);
writetable(T2,fileName2,2);
writetable(T3,fileName2,3);
THE RESULT IS NOT WRITTEN IN EXCEL BUT TO MATLABS WORSPACE
WHA TO DO???
THERE ARE 200 DIFFRENT FOLDERS....

댓글 수: 4

Walter Roberson
Walter Roberson 2019년 3월 17일
Could you explain what you mean about it being written to MATLAB's workspace?
Does C:\Desktop exist? Normally Desktop is further down than that in the folders, C:\Users\(username)\Desktop
irene stella
irene stella 2019년 3월 17일
my code runs...
and gives me outpout for table T1,T2,T3...
and I can read them in matlabs workspace...
but I want them t be stored direcly in excel file which is on the desktop
I have changed the directory name to : C:\Users\Sakoulis\Desktop\RESULTS\CODE.xlsx
Do you get any error message for the writetable() calls ?
You should probably be using 'sheet' keyword, like
writetable(T1, fileName2, 'sheet', 1)
irene stella
irene stella 2019년 3월 17일
thank you very very much!!!!

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

태그

질문:

2019년 3월 17일

댓글:

2019년 3월 17일

Community Treasure Hunt

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

Start Hunting!

Translated by