Thread Subject: Nonlinear Equations

Subject: Nonlinear Equations

From: Josh1640 Sunder

Date: 20 Feb, 2009 16:06:03

Message: 1 of 4

Good morning,
When i try to solve the sistem i linked below i get an error message (and wrong solutions obviously).
I'd like to have some help in solving this equation system:

http://www.drl-guild.com/borzuk/myfuntry.zip

I dont understand what's wrong in it.
Thanks for attention

Subject: Nonlinear Equations

From: Vincent Morio

Date: 21 Feb, 2009 01:45:04

Message: 2 of 4

"Josh1640 Sunder" <giaqui182@libero.it> wrote in message <gnmkdb$1jk$1@fred.mathworks.com>...
> Good morning,
> When i try to solve the sistem i linked below i get an error message (and wrong solutions obviously).
> I'd like to have some help in solving this equation system:
>
> http://www.drl-guild.com/borzuk/myfuntry.zip
>
> I dont understand what's wrong in it.
> Thanks for attention

Hi,

Try to add the jacobian matrix of your system in your function:
function [F,J] = myfun(x)
F = ... % objective function values at x
if nargout > 1 % two output arguments
   J = ... % Jacobian of the function evaluated at x
end
It might help the solver to find a more appropriate search direction so as to decrease the gradient.
Regards,
Vincent

Subject: Nonlinear Equations

From: Marcus M. Edvall

Date: 21 Feb, 2009 03:03:55

Message: 3 of 4

Coding the Jacobian will not help at this point since:

myfuntry(x0)

ans =

  1.0e+023 *

  -0.0000
  -1.6880
  -0.0000
  -0.1553 - 0.0731i
  -0.0000
   0.0000

You must have some serious modeling errors since you are getting
values in the 1e23 range and also complex.

Once you have fixed this problem the problem will probably solve ok.
You can try this TOMLAB code if you like:

toms 6x1 x
obj = myfuntry(x);
start = {x == x0};
con = [];
s = ezsolve(obj,con,start);

It will automatically generate 1st and 2nd order derivatives. You can
use global solvers (glbDirect for example) and fine tune with local
ones (eg snopt).

Best wishes, Marcus
Tomlab Optimization Inc.
http://tomopt.com/
http://tomsym.com/

Subject: Nonlinear Equations

From: Josh1640 Sunder

Date: 23 Feb, 2009 10:32:01

Message: 4 of 4

Hi,
thanks for help.
I'd like to know what do u mean for serious modeling problems.
Are u thinking i wrote wrong values for some of variables/equation? Or what
thank u again for help

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Contact us at files@mathworks.com