I need to right a script that tests ๐‘“(๐‘ฅ) = ๐‘ฅ^3 at ๐‘ฅ = 3 and determine the second order accuracy numerically by plotting the total relative Error vs ฮ”๐‘ฅ in a double log plot, where ฮ”๐‘ฅ = 10^๐‘’๐‘ฅ๐‘ with the ๐‘’๐‘ฅ๐‘ varying from 0 to โˆ’6 with a step size of 0.25. I have found the second order accurate finite difference approximation for the first derivative of a function ๐‘“(๐‘ฅ) to be f'(x)=f(xi+ฮ”x)-f(xi-ฮ”x)/2(ฮ”x).
Any suggestions?

๋‹ต๋ณ€ (0๊ฐœ)

์นดํ…Œ๊ณ ๋ฆฌ

๋„์›€๋ง ์„ผํ„ฐ ๋ฐ File Exchange์—์„œ Statistics and Machine Learning Toolbox์— ๋Œ€ํ•ด ์ž์„ธํžˆ ์•Œ์•„๋ณด๊ธฐ

์งˆ๋ฌธ:

2020๋…„ 10์›” 12์ผ

๋Œ“๊ธ€:

2020๋…„ 10์›” 13์ผ

Community Treasure Hunt

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

Start Hunting!

Translated by