Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Non linear solver

Status
Not open for further replies.

Marco83

Mechanical
Jun 21, 2006
8
In a time integration cycle I need to solve a non linear algebraic equation.

I know that fsolve can easily do it but I have two problems with it.

1) At each time step fsolve displays (and consequently prints on the output file):
Optimization terminated: first-order optimality is less than options.TolFun.

Since my program runs in background all the displayed infos are printed on an output file (say a.out). Call on a file and print on it is a very time consuming operation and I definately cannot afford it since I have to perform a few million loops.

So, I'd like to know if there is any way to prevent fsolve from printing the line mentioned above.

2) Since the function contains parameters that chage at every loop, I need to write the function itself in an m-file that fsolve calls everytime it is needed. This operation is time consuming and for the reasons mentioned above I'd like to avoid it.
Any suggestion on how to skip tis passage?

Thanks in advance
 
Replies continue below

Recommended for you

Marco83,
I read through this and think that the output:

"Optimization terminated: first-order optimality is less than options.TolFun."

Is how matlab tells the user that the fsolve function has completed its solution.

You can read more here , but I think that if you use the optimset command and set display to off or final that you might remove the extraneous statement, which is causing your problem.

Hope this helps.
BsK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor