I am creating a dialog box with a button on it, what I want this button to do is call up matlab and run one of my M-file, I look up the Matlab help and it tells me to alter the shortcut target or create a batch file with c:\matlabsp1\bin\win32\matlab /r M_file, I create the matlab.bat. and i try to call it up in VC++ 6.0 using:
ShellExecute(NULL,"open","C:\matlab",NULL,NULL);
WinExec("c:\matlab",SW_SHOW);
system("c:\matlab");
but, all of these command just open Matlab, but it doesn't run my M_file, what I mean is that it open the matlab window only. I am using Matlab 6.1 by the way.
What did I do wrong?
please help me, my project is due March31,
ShellExecute(NULL,"open","C:\matlab",NULL,NULL);
WinExec("c:\matlab",SW_SHOW);
system("c:\matlab");
but, all of these command just open Matlab, but it doesn't run my M_file, what I mean is that it open the matlab window only. I am using Matlab 6.1 by the way.
What did I do wrong?
please help me, my project is due March31,