how to display coefficient and offset on graph?
6 ビュー (過去 30 日間)
古いコメントを表示
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](https://www.mathworks.com/matlabcentral/answers/uploaded_files/224829/Capture.png)
0 件のコメント
採用された回答
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)
6 件のコメント
Vishnu Vardhan
2019 年 6 月 17 日
fitoptions should work fine , Once verify whether limits are correct.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Curve Fitting Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!