Here is how I got this to work:
link the following matlab libs:
LIBS += -L "c:/Program Files/MATLAB/R2007b/bin/win32" \
-leng -lmat -lmex -lmwblas -lmwlapack -lmwmathutil -lmx -ldfblas -ldflapack
Then in your program, invoke the engine like so:
#include <engine.h>
....
Engine *ep = engOpen(NULL);
engEvalString(ep,tmp.toStdString().c_str());
#include <engine.h>
....
Engine *ep = engOpen(NULL);
QString tmp = QString("numcycles = 0;");
engEvalString(ep,tmp.toStdString().c_str());
To copy to clipboard, switch view to plain text mode
you can also work with arrays and variables - consult the matlab documentation and search for engGetVariable and engPutVariable
good luck
Bookmarks