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!