Answered

Is it possible to introduce time dependent function in any of the coefficient of pde form used in pde toolbox?

This portion of the documentation describes how to set up a general PDE for solution by PDE Toolbox. This is the general workflo...

Is it possible to introduce time dependent function in any of the coefficient of pde form used in pde toolbox?

This portion of the documentation describes how to set up a general PDE for solution by PDE Toolbox. This is the general workflo...

2 months ago | 0

Answered

genetic algorithm to optimize the variable of linear regression(a,b1,b2)

While you CAN solve a linear regression using ga, it is unwise to do so. Your answers will be faster and more accurate while usi...

genetic algorithm to optimize the variable of linear regression(a,b1,b2)

While you CAN solve a linear regression using ga, it is unwise to do so. Your answers will be faster and more accurate while usi...

2 months ago | 0

Answered

Simultaneous minimization of 3 equations to estimate 4 parameters

Did you understand that in general there is no such thing as the minimum of a vector-valued function? gamultiobj finds a Pareto ...

Simultaneous minimization of 3 equations to estimate 4 parameters

Did you understand that in general there is no such thing as the minimum of a vector-valued function? gamultiobj finds a Pareto ...

2 months ago | 0

| accepted

Answered

Linprog: Any ideas why x in [0,1] return a binary solution?

I am not sure that I understand your objective function or all of your constraints, but it is well known that the solution of a ...

Linprog: Any ideas why x in [0,1] return a binary solution?

I am not sure that I understand your objective function or all of your constraints, but it is well known that the solution of a ...

2 months ago | 0

Answered

Linprog: some lambda.lower > lambda.upper in output

You are mistaken that lambda.lower relates to lambda.upper. These are Lagrange multipliers. If the solution is at a lower bound,...

Linprog: some lambda.lower > lambda.upper in output

You are mistaken that lambda.lower relates to lambda.upper. These are Lagrange multipliers. If the solution is at a lower bound,...

2 months ago | 0

Answered

How to solve a minimization problem of a least squares cost function?

To solve a set of nonlinear equations, I suggest that you use fsolve instead of fminunc. For fsolve your objective function shou...

How to solve a minimization problem of a least squares cost function?

To solve a set of nonlinear equations, I suggest that you use fsolve instead of fminunc. For fsolve your objective function shou...

2 months ago | 1

Answered

passing matrices in fmincon objective function

What does it mean to minimize a function that has more than one dimension? The answer is, the problem is ill-defined, there is n...

passing matrices in fmincon objective function

What does it mean to minimize a function that has more than one dimension? The answer is, the problem is ill-defined, there is n...

2 months ago | 0

Answered

How can I set up nonlcon in fmincon using a surface?

I do not understand your syntax opt = fmincon(p_surf,x0,[],[],[],[],lb,ub,[[t_surf], []],[]) and I suspect that fmincon does n...

How can I set up nonlcon in fmincon using a surface?

I do not understand your syntax opt = fmincon(p_surf,x0,[],[],[],[],lb,ub,[[t_surf], []],[]) and I suspect that fmincon does n...

2 months ago | 0

Answered

Meshing in Matlab using PDEToolbox

As the generateMesh page states, PDE Toolbox uses a triangular mesh in 2-D and a tetrahedral mesh in 3-D. This is also stated on...

Meshing in Matlab using PDEToolbox

As the generateMesh page states, PDE Toolbox uses a triangular mesh in 2-D and a tetrahedral mesh in 3-D. This is also stated on...

2 months ago | 0

Answered

user defined hessian in fminunc

The documentation on writing gradients and Hessians is here. The specifics for setting options and includiing the Hessian is her...

user defined hessian in fminunc

The documentation on writing gradients and Hessians is here. The specifics for setting options and includiing the Hessian is her...

2 months ago | 0

| accepted

Answered

Matlab 2020a outputs wrong fval for quadprog

Your problem has an added constant term that quadprog does not take into account, though solve does. Did you try calling [sol f...

Matlab 2020a outputs wrong fval for quadprog

Your problem has an added constant term that quadprog does not take into account, though solve does. Did you try calling [sol f...

2 months ago | 1

| accepted

Answered

multistart with matlab function

You almost had it right. Your objective function is @(x,xdata)myfun(x,xdata,E_x,Gamma_X,Gamma_C) where the arguments E_x,Gamma...

multistart with matlab function

You almost had it right. Your objective function is @(x,xdata)myfun(x,xdata,E_x,Gamma_X,Gamma_C) where the arguments E_x,Gamma...

2 months ago | 0

| accepted

Answered

multiobjective mix integer variable

You have just two binary variables. I suggest that you solve four problems, one for each configuration of the two binary variabl...

multiobjective mix integer variable

You have just two binary variables. I suggest that you solve four problems, one for each configuration of the two binary variabl...

2 months ago | 0

| accepted

Answered

fmincon fails to find a feasible solution

You might also want to consult the documentation on Converged to an Infeasible Point. Alan Weiss MATLAB mathematical toolbox d...

fmincon fails to find a feasible solution

You might also want to consult the documentation on Converged to an Infeasible Point. Alan Weiss MATLAB mathematical toolbox d...

2 months ago | 0

Answered

Understanding why GA's penalty profile is so similar for any run

Look at the definition of penalty value in the Integer ga Algorithm: If the member is feasible, the penalty function is the fit...

Understanding why GA's penalty profile is so similar for any run

Look at the definition of penalty value in the Integer ga Algorithm: If the member is feasible, the penalty function is the fit...

2 months ago | 1

Answered

define a dummy decision variable for optimization problem

It sounds to me as if the best approach is to solve three separate optimization problem, one for each value of m, and compare th...

define a dummy decision variable for optimization problem

It sounds to me as if the best approach is to solve three separate optimization problem, one for each value of m, and compare th...

2 months ago | 0

Answered

Finding feasible solution with intlinprog

A nonzero objective function vector can sometimes help intlinprog by breaking symmetry in the constraints. It is never clear wit...

Finding feasible solution with intlinprog

A nonzero objective function vector can sometimes help intlinprog by breaking symmetry in the constraints. It is never clear wit...

2 months ago | 2

Answered

How to solve SOCP program on MATLAB?

Currently, there is no dedicated SOCP solver in Optimization Toolboxâ„˘. But you can often include this kind of constraint either ...

How to solve SOCP program on MATLAB?

Currently, there is no dedicated SOCP solver in Optimization Toolboxâ„˘. But you can often include this kind of constraint either ...

2 months ago | 0

Answered

How does MATLAB calculate the jacobian of a function that does not have an expression in lsqnonlin?

It is possible that the examples Fit ODE, Problem-Based or Fit an Ordinary Differential Equation (ODE) would show you reasonable...

How does MATLAB calculate the jacobian of a function that does not have an expression in lsqnonlin?

It is possible that the examples Fit ODE, Problem-Based or Fit an Ordinary Differential Equation (ODE) would show you reasonable...

2 months ago | 0

Answered

Optimization of Linear Model

I suggest that you look in the documentation. There are a wide variety of examples. https://www.mathworks.com/help/optim/exampl...

Optimization of Linear Model

I suggest that you look in the documentation. There are a wide variety of examples. https://www.mathworks.com/help/optim/exampl...

2 months ago | 0

| accepted

Answered

Why does Multistart give a output same as the initial guess value?

There is a good chance that things would do better if you would scale your problem. Some of your bounds are of order 1e15, some ...

Why does Multistart give a output same as the initial guess value?

There is a good chance that things would do better if you would scale your problem. Some of your bounds are of order 1e15, some ...

2 months ago | 0

Answered

Need help with mathematical optimization - fmincon

Your problem sounds natural for the surrogateopt solver in Global Optimization Toolbox. In particular, fmincon is a gradient-bas...

Need help with mathematical optimization - fmincon

Your problem sounds natural for the surrogateopt solver in Global Optimization Toolbox. In particular, fmincon is a gradient-bas...

3 months ago | 1

Answered

Adding two linear inequality constraints in Optimization toolbox

You say that your new constraints are linear. In that case, you add one row to A and to b for each new constraint. For example, ...

Adding two linear inequality constraints in Optimization toolbox

You say that your new constraints are linear. In that case, you add one row to A and to b for each new constraint. For example, ...

3 months ago | 1

Answered

Constraint function in optimization toolbox

I think that you missed the step where you call the external function to calculate the nonlinear constraint. function [c,ceq] =...

Constraint function in optimization toolbox

I think that you missed the step where you call the external function to calculate the nonlinear constraint. function [c,ceq] =...

3 months ago | 0

| accepted

Answered

Paretosearch graph doesn't appear

Consult the documentation for the available plot functions. In partiicular, you find this statement there: "For patternsearch o...

Paretosearch graph doesn't appear

Consult the documentation for the available plot functions. In partiicular, you find this statement there: "For patternsearch o...

3 months ago | 0

Answered

How to use bayesopt function to predict the optimal parameters for the experiment?

It soiunds to me as if there are two steps to your problem: Fit a parameterized function to some data. So you might have some f...

How to use bayesopt function to predict the optimal parameters for the experiment?

It soiunds to me as if there are two steps to your problem: Fit a parameterized function to some data. So you might have some f...

3 months ago | 0

| accepted

Answered

How to solve multiobjective optimization problem?

If you have Global Optimization Toolbox you can use paretosearch or gamultiobj to find a Pareto set for your problem. See Multio...

How to solve multiobjective optimization problem?

If you have Global Optimization Toolbox you can use paretosearch or gamultiobj to find a Pareto set for your problem. See Multio...

3 months ago | 0

| accepted

Answered

Creating an Partial Initial Population of Matrices for a Genetic Algorithm

ga accepts only row vectors as population members. However, it is easy for you to call reshape in your fitness function to turn ...

Creating an Partial Initial Population of Matrices for a Genetic Algorithm

ga accepts only row vectors as population members. However, it is easy for you to call reshape in your fitness function to turn ...

3 months ago | 0

Answered

Dynamic bounds in an optimizer

You are describing a nonlinear constraint. This is a type of constraint that simulannealbnd cannot handle. In fact, your constr...

Dynamic bounds in an optimizer

You are describing a nonlinear constraint. This is a type of constraint that simulannealbnd cannot handle. In fact, your constr...

3 months ago | 0

| accepted

Answered

Multistart and lsqnonlin - Parallelization doesn't seem to provide any benefit.

I have to ask: do you have Parallel Computing Toolbox installed? It is required for MultiStart to run in parallel. I do not und...

Multistart and lsqnonlin - Parallelization doesn't seem to provide any benefit.

I have to ask: do you have Parallel Computing Toolbox installed? It is required for MultiStart to run in parallel. I do not und...

3 months ago | 0

| accepted