Testing finite difference approximation
์กฐํ ์: 20 (์ต๊ทผ 30์ผ)
์ด์ ๋๊ธ ํ์
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
๋ต๋ณ (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!