Make a good plot of the function: f(x) = sin(1/x) for 0.01 < x < 0.1. How did you create x so that the plot looks good?

回答 (2 件)

In this case, I'd rather use a logarithmic spaced x instead of a linearly spaced one. I'm sure you are aware that this function gets tricky for small x, so you'll need quite a lot of points to evaluate there. You can use something like
x=logspace(-2,-1,500);
y = sin(1./x);
plot(x,y)
Sajjadul Haque
Sajjadul Haque 2020 年 9 月 9 日

0 投票

F(x)= sin-1(x)
Write down the matlab program to determine central,
forward and backward derivatives of F(x); and also Write
down the matlab program to determine the exact derivative.

カテゴリ

ヘルプ センター および File Exchange2-D and 3-D Plots についてさらに検索

質問済み:

2015 年 2 月 19 日

回答済み:

2020 年 9 月 9 日

Community Treasure Hunt

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

Start Hunting!

Translated by