how to display coefficient and offset on graph?

조회 수: 14 (최근 30일)
Jaehwi Bong
Jaehwi Bong 2019년 6월 17일
댓글: Vishnu Vardhan 2019년 6월 17일
I'd like to display some values to plot. What should I do ?
A=xlsread('A.xlsx');
t=A(:,1);
i=A(:,2)/10^(2);
ft = fittype('a*exp(-x/b)+c');
F=fit(t,i,ft)
b = 1/F.b;
offset = F.c;
plot(t,i);
hold on;
plot(F)
hold off
It's an example plot, I'd like to make a plot through codes like this figure.
Capture.PNG

채택된 답변

Vishnu Vardhan
Vishnu Vardhan 2019년 6월 17일
Hi Jaehwi
You can use text function available in MATLAB by specifying the location of text wherever you want.
txt = {'b=0.007','Offset='};
text(220,10.5,txt)
This documentation may help you further
  댓글 수: 6
Vishnu Vardhan
Vishnu Vardhan 2019년 6월 17일
fitoptions should work fine , Once verify whether limits are correct.
Once go through this link , might help you in someway.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by