How to plot a fit object without extrapolation?
Mostra commenti meno recenti
Hi, I am looking for a way to plot a curve fit object but without the extrapolation at the beginning and the end of the curve. My code for the current graph is as follows:
% Fit
[Fit.(string).fitresult, Fit.(string).gof] = fit( xData1, yData1, ft, 'Normalize', 'on' );
hc(k) = plot(xData1, yData1, '.', 'Marker', markerlist(k),'MarkerEdgeColor',colorlist(k,:),'MarkerFaceColor',colorlist(k,:));
hold on
% Plot fit
ha = plot(Fit.(string).fitresult);
Which generates this figure:

Since the end line, especially for the red curve, is not right, I need to remove that part. Does anyone have a solution? Thanks in advance! Best regards, Katharina
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Fit Postprocessing in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!