1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
| function xls_press(h,dummy)
figure_moteur1 = figure(1) ;
delete(allchild(gcf));
set(gcf,'Position',[20 100 175*2.25 400]);%,'Visible','off');
IsoCSE=[150:10:250,250:10:300,300:50:400,400:100:800];
if strcmpi(get(menu_cartographies_moteur1_ordonnee_couple,'Checked'),'on')
SIMPA_CalcCSE_TVK(IceRef,'Charge','Torque','IsoCSE',IsoCSE);
xlabel('Engine revolution [tr/min]','FontSize',8);
ylabel('Torque [Nm]','FontSize',8);
CmaxRef = PMEmaxRef*IceRef.Cyl*100000/(4*pi);
axis ([1000 RegimeMaxRef 0 round(CmaxRef)+2]);
box on
else
SIMPA_CalcCSE_TVK(IceRef,'Charge','Torque','IsoCSE',IsoCSE);
xlabel('Engine revolution [tr/min]','FontSize',8);
ylabel('BMEP [bar]','FontSize',8);
axis ([1000 RegimeMaxRef 0 round(PMEmaxRef)+1]);
box on
end
Excel = actxserver('Excel.Application');
print '-dmeta' figure_moteur1.emf;
% Set it to visible and add a workbook
set(Excel,'Visible',1);
Workbooks = Excel.Workbooks;
Workbook = invoke(Workbooks,'Open','G:\Outils\FicheResultatsCalculsCruise');
Shapes = Workbook.ActiveSheet.Shapes;
% Add image
invoke(Shapes,'AddPicture', [pwd '\' 'figure_moteur1.emf'] ,1,0,400,18,300,235);
end |
Partager