Answered
Error using barrier. Objective function is undefined at initial point. Fmincon cannot continue.
Without examining your code, I can suggest the following: Try to evaluate |fun(x0)|, where |fun| is your objective function a...

8 years ago | 2

Answered
How to solve a system of equations?
You have an errant space just before "+0.34" that is confusing the parser. Try this: F=@(x)[sqrt((x(1)-5)^2 + x(2)^2 + x(3)...

8 years ago | 1

Answered
How to reduce the time consumption of GA with constraints satisfaction?
If your problem does not have integer constraints, then I suggest that you do not use |ga|. If the problem is smooth, use |fminc...

8 years ago | 0

Answered
interpolate result.Mesh and result.Nodal
I'm not sure that I understand what you mean about interpolating the mesh, but there is indeed a built-in way to interpolate res...

8 years ago | 0

Answered
fmicon constraint violation issue
For a general question such as this, here is the general documentation: <https://www.mathworks.com/help/optim/ug/when-the-sol...

8 years ago | 0

| accepted

Answered
How to find the optimal values of inputs when outputs have constraints in optimization
Use <https://www.mathworks.com/help/optim/ug/fmincon.html |fmincon|>. See <https://www.mathworks.com/help/optim/ug/writing-scala...

8 years ago | 0

| accepted

Answered
Fmincon optimization of integral with nonlinear constraints leads to false result
It is possible that you are running into the issue discussed in <https://www.mathworks.com/help/optim/ug/optimizing-a-simulation...

8 years ago | 0

| accepted

Answered
Feasible Sequential Quadratic Programming in Matlab
There is no solver in Optimization Toolbox(TM) or Global Optimization Toolbox that guarantees that intermediate iterates will be...

8 years ago | 0

Answered
How should I choose the FunctionTolerance of genetic algorithm optimisation?
I recently answered a customer support problem that sounded like yours. (Maybe it was you? The support was anonymous from my end...

8 years ago | 0

Answered
How to suppress this error. "Your fitness function must return a Scalar value"
See <https://www.mathworks.com/matlabcentral/answers/380826-your-fitness-function-must-return-a-scalar-value this recent related...

8 years ago | 0

Answered
Set up a nonlinear least squares minimization and use the Matlab optimization tool lsqnonlin to find the receiver's position and the time correction.
This is clearly a copied homework problem (you wrote "(a) (20 pts) Set up a ..."). So instead of asking us to do your homework f...

8 years ago | 0

Answered
i used "active set" algorithm in fmincon and got exit flag 5, is this answer should be considered right or not?
You can <https://www.mathworks.com/help/optim/ug/when-the-solver-might-have-succeeded.html check the documentation> for suggesti...

8 years ago | 0

Answered
optimization with Levenberg-Marquardt algorithm
I am not sure that I understand you, but perhaps you are asking about <https://www.mathworks.com/help/matlab/math/example-curve-...

8 years ago | 0

Answered
Is there a way for genetic algorithm (optimization toolbox) to only output a positive objective function value?
Another approach (probably less efficient than Walter's suggestion) is to have a nonlinear inequality constraint function that i...

8 years ago | 0

Answered
fmincon finds solutions close to the middle of the range
I wonder whether your objective function is insensitive to those variables. Perhaps examine your objective function evaluated at...

8 years ago | 0

Answered
How do I apply a sinusoidal heat input into one of the faces of a 3-D PDE model? And how would I show the results at several different timestamps at once?
You need to pass a nonconstant boundary condition coefficient as <https://www.mathworks.com/help/pde/ug/steps-to-specify-a-bound...

8 years ago | 0

| accepted

Answered
sparse matrices for Aineq,Aeq in genetic algorithm soler(ga) - Reg
No, |ga| does not accept sparse linear constraint matrices. When I tried to pass them just now, I got the following warnings: ...

8 years ago | 0

| accepted

Answered
FMINCON optimizer not plotting
Most likely what you are seeing is that |fmincon| is taking finite difference steps to estimate a gradient in order to calculate...

8 years ago | 0

Answered
How to use Genetic Algorithm (GA) for multi-objective function (Dynamic Optimization)?
This does not look like a multiobjective problem to me. You have a single scalar objective Z. Furthermore, it seems to be an un...

8 years ago | 0

| accepted

Answered
Fmincon repeats the same inputs several times then goes to a new values
It is likely that you are seeing |fmincon| trying to estimate a gradient by taking small finite difference steps, and your displ...

8 years ago | 3

Answered
Find the best possible observation
It sounds like a multiobjective problem to me (you want to maximize a few things and minimize a few things). Generally, there ar...

8 years ago | 0

| accepted

Answered
finding Optimum point among many points
If I understand you correctly, you are looking for a least-squares solution for a nonlinear model. Most likely, |<https://www.ma...

8 years ago | 0

Answered
Will MATLAB optimize a production schedule with many constraints?
This sounds like a job for <https://www.mathworks.com/help/optim/ug/intlinprog.html |intlinprog|> from Optimization Toolbox(TM)....

8 years ago | 1

Answered
How to determine over-fitting from non linear least square optimization tool?
One typical way to do this is by cross-validation, which means fitting a subset of the data and then checking the resulting erro...

8 years ago | 0

Answered
How to use patternsearch to optimize two control vectors of a function; optimizing both variables instead of passing one of them?
I think that the simplest way is to combine your variables into one vector, |x = [Weights,NRates]|, which is what any optimizati...

8 years ago | 1

Answered
Failure in initial user-supplied objective function evaluation. FMINUNC cannot continue.
* |'sqp'| is not a valid algorithm for |fminunc|. Use |optimoptions| to help you set options correctly instead of |optimset|. *...

8 years ago | 1

| accepted

Answered
How can I set an optimization variable to be an element of a set / categorical?
Set your variable to be an integer, and use the integer value to select from a list of predefined values. For examples, see <htt...

8 years ago | 0

| accepted

Answered
How to estimate or optimize parameters in a set of ODEs with a single non linear constraint equation?
Your problem seems to me to be hopelessly muddled. Your objective function is a vector? This is nonsense; objective functions mu...

8 years ago | 0

Answered
Why intlinprog cant solve 6561 variable optimization?
|intlinprog| restricts coefficients to <https://www.mathworks.com/help/optim/ug/intlinprog.html#bt5iuxs-6 no more than 1e25>. So...

8 years ago | 2

| accepted

Answered
How can I set linear constraints in ga algorithm
I wonder if using |intlinprog| with an iterative nonlinear solver <https://www.mathworks.com/help/optim/ug/mixed-integer-quadrat...

8 years ago | 0

Load more