I have an optimization problem shown in uploaded figure file.
Determining the optimal matrix X maximizing given objective function is the problem.
However, since the function inside the log-function is non-concave, MATLAB CVX doesn't work.
How can I solve the problem? How should I transform the form?
Please give me a hand
Related
my problem is the following.
Using linsolve function I am solving an overdetermined matrix 200x50 with very similar elements. Because of this, the solution that I get is not correct. Maybe some of you would have any suggestions how to solve such a system?
Best wishes,
Valerie
It's very likely that your system does not have a solution.
Rather than attempting to solve the system A*x=b, the next best thing you can do is to solve a similar problem:
min norm(A*x-b)
When the norm used is the Euclidean norm, the solution to the minimization problem is called a "Least-Squares solution"
The MATLAB syntax is:
x = A\b
I am relatively new to writing my own code for Matlab though I have used the program a decent amount. Right now I am attempting to code a series of first order non-linear differential equations. They are all in one of two forms like the equations here:
Eventually I will need a set of 30 differential equations.
What I was hoping to do was create a function that could make the differential equation for each component of a certain form, combine them into a single system (essentially a matrix with 1 column and a row for each component), and then solve using a Matlab solver like ODE45, the dsolve function, or something like that to solve the system.
I have not yet found a way to make a function set up this large of a system that works with either dsolve or ODE45. The results always either gave me an empty sym or an error that the initial conditions were not compatible with the system or some other error. So what I am wondering is if there is another way to go about setting up a system that is this large and has nonlinear differential equations.
I do not want someone else's code; I just want an idea for how to go about setting this up in Matlab because nothing I have tried has worked so far.
I have been trying to solve this equation analytical, where C and L is constants:
There is no problem with the general solution, but with the conditions, the expression is close to unsolveable.
Now I'm trying to solve the problem with Matlab, where I believe i shall use the ode45 solver. I just don't know what to do with the integral and omega which is the value I'm trying to find.
I know that i haven't given any code snippet, but I just can't figure out how to solve this problem in Matlab.
I hope someone can help me, thanks.
I have to solve a nonlinear constrained function in matlab. and I am not familiar to it's command.
the problem is:
minimize E(b,c)
constrains k1< c.b^0.5< k2 and c/6>k3
note: E(b,c) is a nonlinear function; also how can I solve this easier one
minimize E(b,c)
constrains c.b^0.5=k2 and c/6>k3
I must use matlab mfile. please suggest me what should I do!
for simplicity imagine: i.e. E(b,c)=b^2+√c+c and k1=8,k2=12,k3=5
I must use Matlab mfile. Please suggest me what should I do!
I would like to plot the E(b,c) based on given constraints and find the b,c pairs, if that is possible.
I am not sure if I really need optimization toolbox or not.
Please give me a short Matlab script if it's ok.
thanks in advance
Your problem seems to be non-linear constrained optimization. Check, if your objective function is convex or not. Save you objective function and constraints in an m.file. Use optimization toolbox, select a solver that best suits your problem [Please refer http://in.mathworks.com/help/optim/ug/choosing-a-solver.html?refresh=true for choosing the right solver and right algorithm.]
The following equation is to be solved for M by MATLAB:
(Atemp/At)^2=1/M^2*((2/(gamma+1))*(1+(gamma-1)*M^2/2))^((gamma+1)/(gamma-1))
It is not possible to solve this equation symbolically. In Maple it is easily possible to solve such an equation implicitly; now, is there also a pre-made function in Matlab that does this for me? I could program one myself, but as my skills are limited, its performance would not fit my needs.
I would try using fzero, or if that encounters problems because of complex values/infinities, fminbnd.