Search All of the Math Forum:

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

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

 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

Christopher Creutzig <Christopher.Creutzig@mathworks.com> wrote in message <4EBA8B5A.5090609@mathworks.com>...
> 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)

>
>
> 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.

Uwe

Date Subject Author
11/1/11 Uwe Brauer
11/1/11 Alan Weiss
11/9/11 Christopher Creutzig
11/11/11 Uwe Brauer
11/15/11 Christopher Creutzig
11/15/11 Uwe Brauer
11/15/11 Mircea Anghel
11/16/11 Christopher Creutzig