what is the wrong in this?
2 views (last 30 days)
Show older comments
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)));
0 Comments
Accepted Answer
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
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.
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!