请问 engEvalString(ep, strEval) 是什么意思
CString strEval;char buffer;
strEval="i=";
strEval+=itoa(I,buffer,10);
strEval+=";";
engEvalString(ep, strEval);
strEval="k=";
strEval+=itoa(K,buffer,10);
strEval+=";";
engEvalString(ep, strEval);
engEvalString(ep, "cd F:\\lxq1225");
engEvalString(ep, "=matr(Mass,Stiff,i,k);"); //i think it is a function
请问 engEvalString(ep, strEval); 是什么意思,因为 strEval是一个变量 而不是命令 所以请各位指教。:@L doc engEvalString:
engEvalString
Evaluate expression in string
C Syntax
#include "engine.h"
int engEvalString(Engine *ep, const char *string);
Arguments
ep
Engine pointer.
string
String to execute.
Description
engEvalString evaluates the expression contained in string for the MATLAB engine session, ep, previously started by engOpen. It returns a nonzero value if the MATLAB session is no longer running, and zero otherwise.
On UNIX systems, engEvalString sends commands to MATLAB by writing down a pipe connected to the MATLAB stdin. Any output resulting from the command that ordinarily appears on the screen is read back from stdout into the buffer defined by engOutputBuffer. To turn off output buffering, use
engOutputBuffer(ep, NULL, 0);
Under Windows on a PC, engEvalString communicates with MATLAB using a Component Object Model (COM) interface.
页:
[1]