Hi MATLAB Community,
How do I add ± to a,b,c,d like ing the graph?
Any help would be appriciated.
a = 95.80266;
b = -88.53938;
c = 30.84839;
d = -16.56475;
y = a+b*tanh((x+c)/d);
plot(y,tanh(x));
grid on;

 採用された回答

Star Strider
Star Strider 2021 年 3 月 30 日

0 投票

That is an annotation textbox, specifically the result of Create Text Box Annotation with Multiline Text in MATLAB.
You can try usiing them, however I have always found them extremely difficult to work with, so I use text objects instead, since they are simply easier to work with.

4 件のコメント

Kenneth Bisgaard Cristensen
Kenneth Bisgaard Cristensen 2021 年 3 月 30 日
Hi Thanks,
What I'm looking for, is hoe to create a = 95.80266 ±2.70049, so I can plot a curve matching the one in the picture.
Star Strider
Star Strider 2021 年 3 月 30 日
My pleasure!
Try this:
a = 95.80266;
b = -88.53938;
c = 30.84839;
d = -16.56475;
x = linspace(-200, 120, 500);
y = a+b*tanh((x+c)/d);
figure
plot(x, y)
xlabel('Temperature [°C]')
ylabel('Absorved Energy [J]')
The ± values are likely confidence intervals on the parameters. It iwould be difficutl to incorporate them into the plot.
Note — The is a statistic on the goodness-of-fit of the curve to the data. It has nothing to do with ‘x’.
Kenneth Bisgaard Cristensen
Kenneth Bisgaard Cristensen 2021 年 3 月 30 日
Okay thanks, that was really helpful, I appriciate it.
Star Strider
Star Strider 2021 年 3 月 30 日
As always, my pleasure!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeAerospace Blockset についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by