what is the wrong in this?

2 views (last 30 days)
Wesam Hassan
Wesam Hassan on 30 Mar 2017
Commented: Wesam Hassan on 2 Apr 2017
Error using mupadmex
Error in MuPAD command: Index exceeds matrix dimensions.
Error in sym/subsref (line 1577)
B = mupadmex('symobj::subsref',A.s,inds{:});
Error in NewtonMethod (line 13)
x(n+1)=(x(n)-(f(x))/int(f(x)));

Accepted Answer

Walter Roberson
Walter Roberson on 30 Mar 2017
We would need to see the code to be sure, but probably f(x) is a symbolic expression that involves indexing a variable at a position that does not exist.
  9 Comments
Walter Roberson
Walter Roberson on 1 Apr 2017
Where are you evaluating f and its integral at the current point? You are still using f(x) which gives you the formula for the function rather than evaluating the formula at the current point y(n)
I already posted the appropriate code.
Wesam Hassan
Wesam Hassan on 2 Apr 2017
thanks so much i could solve the problem in my code :)

Sign in to comment.

More Answers (0)

Tags

No tags entered yet.

Community Treasure Hunt

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

Start Hunting!