Justinian, there is additional information on vector and matrix operations in the documentation here:
It is an algebraic modeling language and matrix operations are supported although not as easily as MATLAB where matrices are a native structure.
Another strategy is to shift some of the pre- or post-processing to the MATLAB script and use APM for only the parts that need to be optimized. For example, if you Q * Q' can be done after the optimization, the results are returned to the MATLAB script where you can do this processing.
Ziba, you need to change the following line in the minlp.apm file:
minimize obj + y*y*(y+y+y) + y
to be your specific objective function. You should also look at the APM MATLAB toolbox that gives you more flexibility and allows you to solve with the APOPT solver which is much faster than this version because all of the sub-NLP problems in the branch and bound are not solved with MATLAB but with optimized compiled code.
The purpose of this submission is to demonstrate branch and bound algorithms in MATLAB, not necessarily as optimized code. The APOPT through APM MATLAB toolbox is many times faster than this version. The advantage of this version is that you can use any NLP solver to solve the relaxed sub-problems and you also have the source code instead of using it as a web-service.
If I want to use minlp as a function in my program how should I introduce my objective function to this function. I will be thankful if let me know the exact format for calling minlp function.