Answered
Final report for fminunc
Create an <https://www.mathworks.com/help/optim/ug/output-functions.html Output Function> to record whatever information you lik...

9 years ago | 1

| accepted

Answered
Optimization for minimizing cylinder dimensions
You missed counting the |fmincon| input arguments. Try this instead: [x,fval] = fmincon(@objfun,x0,[],[],[],[],[],[],@const...

9 years ago | 0

Answered
Should I treat this as a single or multiobjective optimization?
|gamultiobj| can solve a multiobjective function with nonlinear constraints since <https://www.mathworks.com/help/gads/release-n...

9 years ago | 0

| accepted

Answered
How to include penalty in intlinprog
You need to include a term in your objective function that takes this into account. The term must be a linear function, of cours...

9 years ago | 0

Answered
Trying to solve for the extreme points and maximum value for a function using linprog when the optimum solution is not unique?
You can try changing |f| a little bit and seeing how that changes the answers. Then use the original |f| to examine the resultin...

9 years ago | 0

Answered
Decision making on optimization method
For general optimization there are some <https://www.mathworks.com/help/optim/ug/optimization-decision-table.html general guidel...

9 years ago | 0

Answered
Can Pareto show like an envelope?
Perhaps you should try using the |@fgoalattain| <https://www.mathworks.com/help/gads/gamultiobj.html#input_argument_d0e37444 |Hy...

9 years ago | 0

| accepted

Answered
FMINCON does not optimize error function
Without seeing your |pricee1| function or your |price2| vector or your nonlinear constraint function, it is impossible to guess ...

9 years ago | 1

| accepted

Answered
Difference between fmincon 'TolFun' and 'FunctionTolerance'
I think that you forgot to specify |OptimalityTolerance = 1e-4|. The former |TolFun| was split into two new tolerances. As you s...

9 years ago | 1

| accepted

Answered
Tolerances are relative or not in interior-point for fmincon?
You can find out the answer using the exit message link |stopping criteria details|. Here is what I just saw after running a sma...

9 years ago | 0

Answered
Specify time-dependent PDE coefficients
I am not sure what you are trying to do. Is the "t" that you "impose" equal to the time in your PDE? Or is there an outer loop t...

9 years ago | 0

| accepted

Answered
portfolio optimization using fmincon
If |VCV| is a given matrix in your workspace, take fun = @(x)x'*VCV*x; and then call w = fmincon(fun,x,a,b,Aeq,Beq,...

9 years ago | 1

| accepted

Answered
fmincon objective function one know input matrix and one decision variable matrix
Without reading your code in detail, if |z| is given (numeric) and you want to find |x|, then have your objective function be ...

9 years ago | 0

Answered
Solving a non-linear equations system : how to consider every lines separatly and not only a scalar though a norm.
For a system of equations, the appropriate solver is usually <https://www.mathworks.com/help/optim/ug/fsolve.html |fsolve|>, not...

9 years ago | 0

Answered
How can I control the smallest spacing of mesh points in an adaptive 2D grid using generateMesh()?
For now, you might want to use to older functionality of <https://www.mathworks.com/help/pde/ug/adaptmesh.html |adaptmesh|>. Thi...

9 years ago | 0

Answered
Convert [p,e,t] to FEMesh for PDEModel
Sorry, there are currently <https://www.mathworks.com/help/pde/ug/three-ways-to-create-2-d-geometry.html just three ways to crea...

9 years ago | 0

| accepted

Answered
Genetic Algorithm for multiple variables
There are at least two issues here. 1. All fitness functions must be a function of ONE VARIABLE. However, this variable, usua...

9 years ago | 0

Answered
use fmincon to solve a complex nonlinear optimization: Not enough input arguments.
Without looking at your code in detail, I think that you made the error of using two different inputs, |k| and |s|, to |fmincon|...

9 years ago | 0

| accepted

Answered
How to use the PDE Toolbox combined with the script?
It is possible that you are getting bit by a bug. Sorry. I believe that you will have no problems if you create your circles usi...

9 years ago | 0

| accepted

Answered
Best fit curve for non-linear data with 3 unknowns
Perhaps <https://www.mathworks.com/help/optim/examples/nonlinear-data-fitting.html this example will help>. Alan Weiss MAT...

9 years ago | 0

| accepted

Answered
How can I Identify Boundary Labels when writing a PDE code (not with the pdetool)?
Check out how to <https://www.mathworks.com/help/pde/ug/create-geometry-using-a-geometry-function.html create geometry using a g...

9 years ago | 0

| accepted

Answered
Can the Neumann boundry condition in the PDE Toolbox be stated as the current density (grad u) equals an exponential function of the unknown (u)? (the PDE is elliptic, Laplace)
Sorry, I do not see how to codify this boundary condition in PDE Toolbox. The <https://www.mathworks.com/help/pde/ug/steps-to-sp...

9 years ago | 0

Answered
Specifying 3D PDE Coefficients at Element Centroids
For 3-D problems you must pass nonconstant coefficients in the <https://www.mathworks.com/help/pde/pde-coefficients.html requisi...

9 years ago | 0

Answered
Fsolve: Issues Solving a system of equations
Well, you gave an iteration limit of 100, and that is what stopped the solver. You can pick up the solution process from the fin...

9 years ago | 1

Answered
Genetic algorithm for discrete trajectory design
You can set bound for your control vector |u| in the |lb| and |ub| arguments; see the <https://www.mathworks.com/help/gads/ga.ht...

9 years ago | 0

Answered
fsolve in for loop: failure in initial objective function evaluation
Perhaps the problem is your statement input=ones(nn,1)'; That makes |input| a 1-by-nn vector, when you want it to be nn-...

9 years ago | 0

Answered
How to set space-varying boundary conditions?
You can use |applyBoundaryCondition|. You just have to create a mesh for the geometry. % Create a 3-dimensional PDE Model ...

9 years ago | 0

| accepted

Answered
How to optimize a non linear single objective function constrained with only integer variables using genetic algorithm?
You would probably do best to use the |ga| <https://www.mathworks.com/help/gads/mixed-integer-optimization.html mixed integer op...

9 years ago | 0

| accepted

Answered
Hi all, i get this error at using GA optimtool " error running optimization. matrix dimensions must agree" so kindly can any one explain what is the problem.
|fmincon| is more forgiving about the orientation of your variables, allowing you to pass arrays of any dimension, as described ...

9 years ago | 0

Answered
lsqnonlin time limit without using OutputFcn? If it is not possible, how to use OutputFcn in this case.
I don't really understand what you mean "When lsqnonlin take too long, I'd like it to go to the next iteration." But I can help ...

9 years ago | 0

Load more