H1=xlsread('.xlsx','Steps','A:A');
H2=xlsread('.xlsx','Steps','C:C');
H3=xlsread('.xlsx','Steps','E:E');
H4=xlsread('.xlsx','Steps','G:G');
H5=xlsread('.xlsx','Steps','I:I');
H6=xlsread('.xlsx','Steps','K:K');
H7=xlsread('.xlsx','Steps','M:M');
P1=xlsread('.xlsx','Steps','S:S');
P2=xlsread('.xlsx','Steps','T:T');
P3=xlsread('.xlsx','Steps','U:U');
P4=xlsread('.xlsx','Steps','V:V');
P5=xlsread('.xlsx','Steps','W:W');
P6=xlsread('.xlsx','Steps','X:X');
P7=xlsread('.xlsx','Steps','Y:Y');
IH1=trapz(H1)/1000;
IH2=trapz(H2)/1000;
IH3=trapz(H3)/1000;
IH4=trapz(H4)/1000;
IH5=trapz(H5)/1000;
IH6=trapz(H6)/1000;
IH7=trapz(H7)/1000;
IP1=trapz(P1)/1000;
IP2=trapz(P2)/1000;
IP3=trapz(P3)/1000;
IP4=trapz(P4)/1000;
IP5=trapz(P5)/1000;
IP6=trapz(P6)/1000;
IP7=trapz(P7)/1000;
A=[IH1,IH2,IH3,IH4,IH5,IH6,IH7];
B=[IP1,IP2,IP3,IP4,IP5,IP6,IP7];
C=mean(A);
D=std(A);
E=mean(B);
F=std(B);
Results=[C,D,E,F];
col_header={'1','2','3','4','5','6'};
filename='RESULT.xlsx';
xlswrite(filename,col_header,'Sheet1','A1');
xlswrite(filename,A.','Sheet1','A2');
xlswrite(filename,B.','Sheet1','B2');
xlswrite(filename,Results,'Sheet1','C2');
clear
6 Comments
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/650433-how-do-i-run-my-matlab-program-through-multiple-excel-files-in-the-folder#comment_1148303
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/650433-how-do-i-run-my-matlab-program-through-multiple-excel-files-in-the-folder#comment_1148303
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/650433-how-do-i-run-my-matlab-program-through-multiple-excel-files-in-the-folder#comment_1153458
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/650433-how-do-i-run-my-matlab-program-through-multiple-excel-files-in-the-folder#comment_1153458
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/650433-how-do-i-run-my-matlab-program-through-multiple-excel-files-in-the-folder#comment_1159098
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/650433-how-do-i-run-my-matlab-program-through-multiple-excel-files-in-the-folder#comment_1159098
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/650433-how-do-i-run-my-matlab-program-through-multiple-excel-files-in-the-folder#comment_1159143
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/650433-how-do-i-run-my-matlab-program-through-multiple-excel-files-in-the-folder#comment_1159143
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/650433-how-do-i-run-my-matlab-program-through-multiple-excel-files-in-the-folder#comment_1159213
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/650433-how-do-i-run-my-matlab-program-through-multiple-excel-files-in-the-folder#comment_1159213
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/650433-how-do-i-run-my-matlab-program-through-multiple-excel-files-in-the-folder#comment_1159418
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/650433-how-do-i-run-my-matlab-program-through-multiple-excel-files-in-the-folder#comment_1159418
Sign in to comment.