Christopher Creutzig <Christopher.Creutzig@mathworks.com> wrote in message <4EC235EE.firstname.lastname@example.org>... > On 11.11.11 16:17, Uwe Brauer wrote: > > > 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. > > I still don't understand the problem. Something like the following > sketch should work, no? > > ... > J = jacobian(expression, vars); > ... > % within some loop: > ... > Fval = double(subs(expression, vars, values)); > Jac = double(subs(J, vars, values)); > ... > > > > Christopher
right, after thinking about it I came up with a similar solution, BTW why do you use double?