HyCase.Application.PlayScript([pwd,'\saveCompFigure.SCP'])
serv2=actxserver('excel.application');
xlsfile=serv2.Workbooks.Open([pwd,'\compHistoryxD_2stabil.csv']);
xlsfile.Activate
%serv2.Visible=1;

cellend = t_dur*3+11;
x = cell2mat(xlsfile.Worksheets.Item('compHistoryxD_2stabil').Range(['a12:a',num2str(cellend)]).Value)/60;
yDcalc = cell2mat(xlsfile.Worksheets.Item('compHistoryxD_2stabil').Range(['c12:c',num2str(cellend)]).Value);
yDmodel = cell2mat(xlsfile.Worksheets.Item('compHistoryxD_2stabil').Range(['b12:b',num2str(cellend)]).Value);
figure(1)
plot(x,yDcalc,x,yDmodel,'k')
legend('yD calc','yD of model')
serv2.Workbooks.Close
serv2.release

serv2=actxserver('excel.application');
xlsfile=serv2.Workbooks.Open([pwd,'\compHistoryxB_2stabil.csv']);
xlsfile.Activate
% serv2.Visible=1;
cellend = t_dur*3+11;
x = cell2mat(xlsfile.Worksheets.Item('compHistoryxB_2stabil').Range(['a12:a',num2str(cellend)]).Value)/60;
yBcalc = cell2mat(xlsfile.Worksheets.Item('compHistoryxB_2stabil').Range(['c12:c',num2str(cellend)]).Value);
yBmodel = cell2mat(xlsfile.Worksheets.Item('compHistoryxB_2stabil').Range(['b12:b',num2str(cellend)]).Value);
figure(2)
plot(x,yBcalc,x,yBmodel,'k')
legend('xB calc','xB of model')
serv2.Workbooks.Close
serv2.release