You will probably end up finding the solution with fmincon or fminunc in MATLAB. In other words, I would like for Matlab to tell me the values of w1, w2, and w3 that maximize x, while leaving all the other variables alone. I would like to maximize x by changing only variables w1, w2, and w3. More specifically, my function looks something like: function x = NameOfFunction (w1, w2, w3, a, b, c, Structure1, Structure2, Structure3) My issue is that I am trying to maximize the value of the function by altering three scalar variables, while leaving the other input variables constant (since they are data). As inputs, it takes on a number of scalar variables as well as multiple structures that contain data that is used in the calculations. The function I am trying to maximize is relatively complex. I am unable to figure out how to apply these examples in my own case. The documentation appears to only provide examples of optimization problems that analyze simple one-line functions like f(x) = -(x1)(x2)(x3). But, I'm lost when it comes to Matlab's optimization process. In excel, using the solver, it's easy: I can choose a cell with a formula then pick the cells i need to change and add constraints and then minimize. I have data in excel which I am using to make an optimization analysis. EDIT: I have edited my question to be more specific as horchler's comment helped get me started.
0 Comments
Leave a Reply. |