From: Waqar Asad on
Hello Everyone:

I am having problem in using matlab functions from C++. Here is my C++ compiler info:

Microsoft Visual C++ 2008 SP1

I have included engine.h, matrix.h, and tmwtypes.h files as required by the program and almost following the procedure mentioned in engwindemo.c file.

Here is my example code:

Engine *engOpen(const char *startcmd);

const char *stringA = "cd('D:/Waqar');";
int engEvalString(Engine *ep, char * (stringA));

const char *string = "D = importdata('InputMatrixA.txt', ' ');";
int engEvalString(Engine *ep, char * (string));

const char *string2 = "dlmwrite('m2.txt', D, 'delimiter', '\t', 'newline','pc');";
int engEvalString(Engine *ep, char * (string2));

I will appreciate if someone could help.

Waqar.