From: kem on
Hi,

My objective function is to minimize the L2 norm of some vector + I
have a linear constraint on the variables.

So the output of the objfun:

1) in case of using lsqnonlin:
F = [ f_1 ; f_2 ; .... ; f_n ; A* f - b]

2) and in case of fmincon the output is:
sum ( f_i.^2 ) with the constraint A*f=b

Which one of the two is better to use? what are the pros and cons of
each of the methods?

Thanks




From: Marcus M. Edvall on
The best method for dense problems is NLSSOL in TOMLAB /NPSOL since
you define the problem with residuals and linear constraints as one
would normally want. This provides for better ways of scaling the
problem and such.

If the problem is sparse, then slsSolve in conjunction with TOMLAB /
SNOPT is usually best since the residuals are transferred to the
constraints and you can utilize the sparsity.

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

On 5 mayo, 13:21, kem <keme...(a)gmail.com> wrote:
> Hi,
>
> My objective function is to minimize  the L2 norm of some vector  +  I
> have a linear constraint on the variables.
>
> So the output of the objfun:
>
> 1)  in case of using lsqnonlin:
> F =  [  f_1 ; f_2 ; .... ; f_n ;  A* f - b]
>
> 2)  and in case of fmincon the output is:
> sum (   f_i.^2  )  with the constraint A*f=b
>
> Which one of the two is better to use?  what are the pros and cons of
> each of the methods?
>
> Thanks