I would like to transfer a figure into excel. the 1st figure will be produced in the middle of the overall code.

조회 수: 4 (최근 30일)
subplot(2,2,1)
Angle=linspace(100-90,250-90);
%the angle needed for this is (-ve direcion)
plot(Breakeven,Angle)
xlabel('Breakeven')
ylabel('Angle(Deg)')
RadianAngle=spline(Breakeven,cangle,0);
DegreeAngle=RadianAngle/(180*pi);
col_header={'Breakeven','Angle'};
xlswrite('data.xlsx',[Breakeven(:),Angle(:),],'Sheet1','A2' );
xlswrite('data.xlsx',col_header,'Sheet1','A1');
xlswritefig(gcf,'Results.xlxs','Sheet1','D2'); ->i would like the figure to be exported to the file as well.
Choicedeflection=input('Deflection of choice (mm) : ')
Angleofchoice=spline(Breakeven,Angle,Choicedeflection)
col_header={'Choice of Deflection','Angle recommended'};
xlswrite('data.xlsx',[Choicedeflection(:),Angleofchoice(:),],'Sheet2','A2' );
xlswrite('data.xlsx',col_header,'Sheet2','A1');

답변 (1개)

Vijay
Vijay 2022년 11월 16일
You can use the function xlswritefigfrom the link below.
narginsupport in scripts have been removed since 2016 you can use narginchk instead.
Please refer to the documentation below for 'narginchk'
Hope that helps!

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by