I want to call matl开发者_开发问答ab from QT 4 (used for UI only in my project) where i can pass values and read values back from matlab. and also run the .m scripts and then get the results back from matlab.
QT is irrelevant here.
You basically want to use the Matlab Engine. You can call Matlab from compiled C++ (for example). You'll probably want to use engOpen
to start the connection and then engEvalString
to run scripts. You may also want to use engGetVariable
, mxGetClassID
and mxGetDimensions
to access the results.
But definitely read the documentation and try it, then come back with more detailed questions.
精彩评论