Assigning variables to a function newton to find a root

2 views (last 30 days)
I am a super beginner with MATLAB and I am trying to find the root of G(x)=xe^x-N for a general R in the range of f(x)=xe^x. Thus far, I have written:
function x = newton(x0,tolerancem,N)
%This is where it should return the solution to xe^x=N, for any general N.
end
I understand how to do this to an extend with paper and pencil but I was wondering how I can program this in MATLAB. Also do note that this is self-study and I am trying to learn using computationally for greater comprehension. Any help is appreciated.
  2 Comments
Matt J
Matt J on 29 Sep 2013
If you're a super beginner to the point where you cannot write any code, this forum isn't the place to start. This is:
Jan
Jan on 30 Sep 2013
I agree with Matt J. We cannot give a rough 20 hours course in form of an answer here.
I do not understand the mathematical part of the question. "Root of G(x)=xe^x-N for a general R" - but "R" does not appear in the formula. "R in the range of f(x)=xe^x", but the function f(x) does not define a range.

Sign in to comment.

Answers (0)

Categories

Find more on Creating and Concatenating Matrices in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!