NaN even with example codes !

60 views
Skip to first unread message

Anurag Prabhakar

unread,
Feb 27, 2014, 11:01:00 PM2/27/14
to yal...@googlegroups.com
I'm fairly new to the area of convex optimization so I might as well be doing something very silly, but even example codes likes "sudoku.m" are not giving desired results, the whole matrix is NaN. Any help would be appreciated.

Johan Löfberg

unread,
Feb 28, 2014, 2:05:04 AM2/28/14
to yal...@googlegroups.com
Since you haven't told us anything about what you saw (which solver you think you are using, solver log, diagnostic codes etc), I can just as well assume that the problem is that your cat walked over the keyboard and accidentally pressed ctrl-c and terminated the solver before completion. Solution: Remove cat from room during computations.

:-).

Johan Löfberg

unread,
Feb 28, 2014, 2:05:58 AM2/28/14
to yal...@googlegroups.com
BTW, The Sudoku optimization problem is very far from convex. It is a mixed-integer linear program.

Anurag Prabhakar

unread,
Feb 28, 2014, 7:24:18 AM2/28/14
to yal...@googlegroups.com
Damn ! I was expecting something like that :D So all that I did was download and extract the YALMIP zip and add it MatLab's path and tried to run the "sdptutorial.m" and "sudoku.m" codes to see if everything is working well. While I got all 0's and NaN's for the former, the output matrix for the sudoku was all NaN's. So there's some problem, right ?

Johan Löfberg

unread,
Feb 28, 2014, 12:45:41 PM2/28/14
to yal...@googlegroups.com
You still haven't told us what happens when you solve the optimization problem, i.e., run solvesdp (remove the ; after solvesdp(F) to show us what is returned from the command also, in case the solver doesn't run or display anything). With some diagnostics, we'll see.

I can only assume that you don't have any suitable solvers installed, or your solver installation is broken.
http://users.isy.liu.se/johanl/yalmip/pmwiki.php?n=Solvers.Solvers

OPTI Toolbox is a good start, since it installs a bunch of solvers for you. If you are in academia, cplex, gurobi and mosek all have full academic licenses


Reply all
Reply to author
Forward
Message has been deleted
0 new messages