Answered
How can I write sum(j,x(i,j))=1 in GA ? - please answer please
I am not sure that I understand what you are asking. You seem to know about Aeq and beq and their syntax. Is what you want a way...

7 years ago | 0

Answered
fsolve vs solve and linear equations
I don't know if you are solving with Symbolic Math Toolbox™ or Optimization Toolbox™. If you have numeric equations (not symbol...

7 years ago | 0

Answered
Function 'fzero' display "Warning: Reached the limit on the maximum number of intervals in use. Approximate bound on error is 1.8e+01. The integral may not exist, or it may be difficult to approximate numerically to the requested accuracy"
As the warning clearly states, this is not being issues from fzero, but is instead being issued from integral. You should figure...

7 years ago | 0

| accepted

Answered
How to find the minimum of the given function?
Do you have Optimization Toolbox™? If so, I suggest that fminunc might be an appropriate solver. Otherwise, I suggest fminsearch...

7 years ago | 0

| accepted

Answered
Trying to plot results from fmincon
I think that you want your horizontal axis to be the iteration number and your vertical axis to be the x(1) or x(2) value. This...

7 years ago | 0

Answered
Local minima possible. lsqnonlin stopped because the size of the current step is less than the selected value of the step size tolerance.
Perhaps this old example will be helpful. But maybe it is better to use nlparci from Statistics and Machine Learning Toolbox™. ...

7 years ago | 0

Answered
Local minima possible. lsqnonlin stopped because the size of the current step is less than the selected value of the step size tolerance.
Take a look at some suggestions in When the Solver Might Have Succeeded and When the Solver Succeeds. Alan Weiss MATLAB mathem...

7 years ago | 1

| accepted

Answered
Different Bayes Optimization Results
Sorry, it is not clearly documented, but when running Bayesian optimization in parallel, results are not reproducible. You can s...

7 years ago | 2

| accepted

Answered
lsqnonlin with matrices Problem to define the function
As clearly stated in the documentation, "...an objective function ... accepts one input, say x." One input, not a1,a2,a3,a4,b1,b...

7 years ago | 1

| accepted

Answered
Constraints on a set of parameter in the likelihood function with fmincon
I don't understand whether you are optimizing over x, over theta, or over both. If theta is fixed and you are optimizing over x,...

7 years ago | 0

| accepted

Answered
Minimising a matrix function subject to an equality constraint
This looks like a job for fmincon. Your unknown values are the upper (say) triangular elements in y. Create f to handle the up...

7 years ago | 0

Answered
Parameter Estimation for a System of Differential Equations and DAEs
It is possible that the results are too noisy for direct estimation by lsqcurvefit, which is a derivative-based solver. I have t...

7 years ago | 0

| accepted

Answered
laplace equation on a trapezoidal domain
If you have PDE Toolbox, you can easily define this problem using either PDE Modeler app or the command-line method. If you don...

7 years ago | 1

Answered
Optimization Problem about Optimal Portfolio with Aversion Index
I don't see your rho and sigma variables, but you could try sumexpr = optimexpr; for i = 1:n for j = 1:n sumexpr...

7 years ago | 0

Answered
Solving PDEs: time dependent c coefficient
If I understand you correctly, you have a sequence of independent problems; the solution at one time t does not depend on or inf...

7 years ago | 1

| accepted

Answered
LSQCURVEFIT Error When Trying To Optimize Parameters
I think that you probably made a gross modeling error, because your predicted function is the same as predicted = @(c,xdata) c(...

7 years ago | 0

Answered
How do I fix this?
You probably need to write min = fminsearch(@calc, in0); % Note the @ symbol Alan Weiss MATLAB mathematical toolbox documenta...

7 years ago | 0

Answered
Using a Optimization Variable for an If Statement
Generally, you have to encode these kinds of if-then switches using a more complex, but still linear, MILP set of variables. For...

7 years ago | 0

Answered
fmincon ignoring lower function value during convergence
Notice that the feasibility of the iteration you like is about 2e-3, meaning the constraints are not met at that point. fmincon ...

7 years ago | 2

| accepted

Answered
symbolic input error in fzero function
Your objective function must accept a single scalar argument, not four arguments as you have specified. Perhaps what you want i...

7 years ago | 0

| accepted

Answered
How to replace an array of symbolic variable in optimization problem?
I do not understand what you are asking. But perhaps these examples will allow you to help yourself in using symbolic math with ...

7 years ago | 0

Answered
What functions are valid for optimization expressions?
I'm sorry that you couldn't find this information in the documentation. Supported Operations o Optimization Variables and Expres...

7 years ago | 1

| accepted

Answered
Why 'OptimizeHyperparameters' in fitcknn doesn't provide the 3D plot as it says in the documentation?
Thanks for the information. As stated in the HyperparameterOptimizationOptions reference section, ".... If [you set the option t...

7 years ago | 1

Answered
Please advise - Error 'constraints' Too many output arguments
Do not give bounds and linear inequality constraints as a nonlinear constraint function. Your first two nonlinear constraints sh...

7 years ago | 0

| accepted

Answered
Fzero, Function value at starting guess must be finite and real
According to the documentation, the fun argument of integral "must accept a vector argument, x, and return a vector result, y." ...

7 years ago | 0

| accepted

Answered
How to Replace Equation Inside a For Loop?
if t <= 65 % Assume t is your integration variable % Your code here else % Different code here end Alan Weiss MATL...

7 years ago | 1

| accepted

Answered
preference of fmincon than other methods
fmincon uses standard algorithms. You can find references to the algorithms in the Constrained Nonlinear Optimization Algorithms...

7 years ago | 0

| accepted

Answered
Multivariable Optimization problem with MATLAB
I don't understand what you are trying to do exactly. But for troubleshooting, you need to ensure that the function handle that ...

7 years ago | 0

Answered
Understanding bayesopt: 1: Why is the same point tested more than once? 2: Understanding acquisition function
If your objective function is smooth, then you should use fmincon as your optimizer, starting from a variety of initial points t...

7 years ago | 0

Answered
Why does the rowsize of A matter in fmincon
You should not use all-zero rows in A or Aeq. Each such row specifies a linear constraint that does not, in fact, exist. fmincon...

7 years ago | 1

| accepted

Load more