Launching the code using the compiled .exe gui is easy and runs smoothly. Just add mosek to matlab's path using addpath('C:\Program Files\Mosek\9.1\toolbox\R2015a') However, if one want to recompile the gui, it is more involved. Some include paths are hardcoded, and you need to add the include path for eigen, freeglut, anttweakbar, and matlab includes (D:\MatlabR2018a\extern\include) to the Visual Studio project. I had to recompile freeglut in multithread instead of multithread dll (in the code generation settings) otherwise I had linker errors. Then, due to changes in the support of complex variables in Matlab 2018a, you need to change a couple of functions: - in matlab_utils.h line 335, replace v.real() = Eigen::Map<const Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor> >(mxGetPr(m), dim[0], dim[1]); if (mxIsComplex(m)) v.imag() = Eigen::Map<const Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor> >(mxGetPi(m), dim[0], dim[1]); else v.imag().setZero(); by if (mxIsComplex(m)) { //v.imag() = Eigen::Map<const Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor> >(&((*pc).imag), dim[0], dim[1]); for (int i = 0; i < dim[0] * dim[1]; i++) { v.data()[i].real(pc[i].real); v.data()[i].imag(pc[i].imag); } } else { for (int i = 0; i < dim[0] * dim[1]; i++) { v.data()[i].real(pc[i].real); } v.imag().setZero(); } - in matlab_utils.h line 353 MapMat(mxGetPr(m), dim[0], dim[1]) = vr; MapMat(mxGetPi(m), dim[0], dim[1]) = vi; by mxComplexDouble *pc = mxGetComplexDoubles(m); for (int i = 0; i < dim[0] * dim[1]; i++) { pc[i].real = vr[i]; pc[i].imag = vi[i]; } Ultimately, the code runs and produce the expected results.
If you want to contribute with another review, please follow these instructions.
Please consider to cut/paste/edit the raw JSON data attached to this paper.