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

4 Ansichten (letzte 30 Tage)
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 Kommentare
madhan ravi
madhan ravi am 21 Okt. 2018
It’s not a good fit ,upload your code with the required datas
Naveed Hossain
Naveed Hossain am 21 Okt. 2018
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');

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Naveed Hossain
Naveed Hossain am 21 Okt. 2018
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.

Kategorien

Mehr zu Get Started with Curve Fitting Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by