x finds y using newtons method

2 vues (au cours des 30 derniers jours)
Ryan Elway
Ryan Elway le 10 Nov 2017
Réponse apportée : Jan le 10 Nov 2017
I'm a little confused on how I would go about this problem. The function y=f(x) which given x finds y such that x=y+1/8cos(y^2) by performing 5 iterations using newtons method. The code should be within function definition.
Given:
function y=f(x)
y=x
[code goes here]
endfunction
any help with this would help me out tremendously!

Réponses (1)

Jan
Jan le 10 Nov 2017
This is your homework. We can expect, that you have learned the details of the Newton method in the lessons, or you can find them at least in your text book or at https://en.wikipedia.org/wiki/Newton%27s_method. The WikiPedia article contains a "pseudo code" example, which can be converted to Matlab very easily.
Please try it and ask a specific question in case of problems.

Catégories

En savoir plus sur Symbolic Math Toolbox dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by