필터 지우기
필터 지우기

Formatting the fit function

조회 수: 15 (최근 30일)
Ted McG
Ted McG 2021년 11월 2일
편집: Chris 2021년 11월 2일
I am using the fit function and plotting it on a graph with the code below:
fitting = fit(epsilon,load,'poly2');
plot(fitting,epsilon,load);
I am wondering how to edit the linewidth of the fitted line, as there is an error when adding 'linewidth' in the plot function. It also goves an error if I try to use 'markersize.
Any help on how to format/style this would be great.

채택된 답변

Chris
Chris 2021년 11월 2일
편집: Chris 2021년 11월 2일
epsilon = (0:0.2:5)';
load = 2*exp(-0.2*epsilon) + 0.5*randn(size(epsilon));
fitting = fit(epsilon, load, 'poly2');
plots = plot(fitting, epsilon, load)
plots =
2×1 Line array: Line (data) Line (fitted curve)
plots(2).LineWidth = 4;
plots(1).MarkerSize = 8;

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Fit Postprocessing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by