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

조회 수: 4 (최근 30일)
Naveed Hossain
Naveed Hossain 2018년 10월 21일
댓글: Naveed Hossain 2018년 10월 21일
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
madhan ravi
madhan ravi 2018년 10월 21일
It’s not a good fit ,upload your code with the required datas
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에서 Get Started with Curve Fitting Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by