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
Re: Newton Raphson for nxn system using symbolic toolbox
Posted: Nov 11, 2011 10:17 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Christopher Creutzig <> wrote in message <>...
> On 01.11.11 11:20, Uwe Brauer wrote:

> > Here is an example trying to use vectors
> > clear all
> > syms x y
> > e=[x y]
> > f1=sin(e(1)-e(2))
> > e(1)=1
> > e(2)=-1
> > eval(f1)

> Instead of assigning, try
> subs(f1, e, [1 -1])
> Or, as Alan pointed out, convert f1 to a MATLAB function. If you have
> multiple evaluations of the same symbolic expression, that will usually
> be faster.
> Christopher

unfortunately my Matlab version does not provide this feature
for symbolic expressions

But my main problem remains.

I can perfectly write matlab code for solving Newton Raphson for any nxn system, since Matlab uses dynamic memory,
and I have to use as a entry variable the system I want to solve and its jacobian.

However when i only want to have the system and use Matlabs symbolic tool to calculate the jacobian I do not know how to do that since I don't know the size of the jacobian in advance.


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.