How to extend curve fitting line beyond data points on Curve fitting toolbox?

6 次查看(过去 30 天)
Hi, Does anyone know how to extend the curve fitting line on the toolbox?
I have attached an image, and essentially i would like it to reach 5x10^4.
Cheers
  2 个评论
Naveed Hossain
Naveed Hossain 2018-10-21
That's the generated code
function createaxes(Parent1, XData1, YData1, XData2, YData2)
%CREATEAXES(Parent1, XData1, YData1, XData2, YData2)
% PARENT1: axes parent
% XDATA1: line xdata
% YDATA1: line ydata
% XDATA2: line xdata
% YDATA2: line ydata
% Auto-generated by MATLAB on 21-Oct-2018 12:43:47
% Create axes
axes1 = axes('Parent',Parent1,'Tag','sftool surface axes');
hold(axes1,'on');
% Create line
line(XData1,YData1,'Parent',axes1,'DisplayName','Dmge vs. flow1',...
'MarkerFaceColor',[0 0 0],...
'MarkerEdgeColor',[0 0 0],...
'MarkerSize',3,...
'Marker','o',...
'LineStyle','none');
% Create line
line(XData2,YData2,'Parent',axes1,'DisplayName','untitled fit 1',...
'LineWidth',1.5,...
'Color',[0.0705882352941176 0.407843137254902 0.701960784313725]);
% Create zlabel
zlabel('Z');
% Create ylabel
ylabel('Damage ($000 USD)');
% Create xlabel
xlabel('Flow A');
% Create title
title('Damage vs Flow A');
% Uncomment the following line to preserve the X-limits of the axes
% xlim(axes1,[-1259 50000]);
% Uncomment the following line to preserve the Y-limits of the axes
% ylim(axes1,[-1136 24374]);
% Uncomment the following line to preserve the Z-limits of the axes
% zlim(axes1,[-1 1]);
box(axes1,'on');
grid(axes1,'on');
% Set the remaining axes properties
set(axes1,'FontSize',14,'FontWeight','bold');

请先登录,再进行评论。

回答(1 个)

Naveed Hossain
Naveed Hossain 2018-10-21
I didn't write a code. I just used the curve fitting tool box on MATLAB.
I am not really concerned with the quality of the fit, rather I would like the line of fit to not stop where the data is, but to go on onto the end of the x-axis.

类别

Help CenterFile Exchange 中查找有关 Surface and Mesh Plots 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by