How do I plot this without using syms?

I am plotting this function using syms x;
syms x;
f=(exp(x)-1-x)/(x.^2);
fplot(f,[-10.^(-11),10.^(-11)]);
I need to do the same thing without symbolic, and I don't understand how to do that, can someone help me?

 採用された回答

Ameer Hamza
Ameer Hamza 2020 年 4 月 1 日
編集済み: Ameer Hamza 2020 年 4 月 1 日

1 投票

Use function handles. However, note that there is a singularity at 0.
f=@(x) (exp(x)-1-x)./(x.^2);
x = linspace(-1e-11, 1e-11, 100);
y = f(x);
plot(x, y);

その他の回答 (0 件)

カテゴリ

質問済み:

N/A
2020 年 4 月 1 日

編集済み:

2020 年 4 月 1 日

Community Treasure Hunt

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

Start Hunting!

Translated by