I would like to transfer a figure into excel. the 1st figure will be produced in the middle of the overall code.
조회 수: 1 (최근 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');
댓글 수: 0
답변 (1개)
Vijay
2022년 11월 16일
You can use the function ‘xlswritefig’ from the link below.
‘nargin’ support in scripts have been removed since 2016 you can use ‘narginchk’ instead.
Please refer to the documentation below for 'narginchk'
Hope that helps!
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!