The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Newton Raphson for nxn system using symbolic toolbox
Replies: 7   Last Post: Nov 16, 2011 5:09 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Uwe Brauer

Posts: 91
Registered: 12/7/04
Newton Raphson for nxn system using symbolic toolbox
Posted: Nov 1, 2011 6:20 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply


I have already implemented the Newton Raphson method for a
system of n equations. However in my implementation I have
to give the function and its Jacobian (written as a
function) as a input variable.

Now I want to use the symbolic toolbox in order not to
calculate the Jacobian myself. My basic problem is later to
evaluate that expression, since I don't know before hand the
size of the system. While this is not a problem for an
"ordinary" function which uses vectors it seems to be a
problem for symbolic expression.

Here is an example trying to use vectors
clear all
syms x y
e=[x y]

But this does not work! It gives sin(x+y)

While of course
works and gives
f1= 0.9093
but of course for a nxn system I don't know before hand the
size of the system and how many variables I have to set to
numerical values before evaluating the expression f1.

Can anybody help me?


Uwe Brauer

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.