Testing finite difference approximation

์กฐํšŒ ์ˆ˜: 20 (์ตœ๊ทผ 30์ผ)
Jayden Riley
Jayden Riley 2020๋…„ 10์›” 12์ผ
๋Œ“๊ธ€: J. Alex Lee 2020๋…„ 10์›” 13์ผ
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?
  ๋Œ“๊ธ€ ์ˆ˜: 1
J. Alex Lee
J. Alex Lee 2020๋…„ 10์›” 13์ผ
where are you stuck?

๋Œ“๊ธ€์„ ๋‹ฌ๋ ค๋ฉด ๋กœ๊ทธ์ธํ•˜์‹ญ์‹œ์˜ค.

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

์นดํ…Œ๊ณ ๋ฆฌ

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

Community Treasure Hunt

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

Start Hunting!

Translated by