From: future star on 11 Jul 2010 03:16 "John Reilly" <jrhokie1@_NOSPAM_yahoo.com> wrote in message <ef53bb6.0(a)webcrossing.raydaftYaTP>... > Hi Jeff, > > The documentation clearly says: > > After you call mclTerminateApplication, you may not call > mclInitializeApplication again. No MathWorks functions may be called > after mclTerminateApplication. > > The page is in the MATLAB Compiler documentation, and is entitled > "Calling a Shared Library" > > john. > > Jeffrey wrote: > > > > > > Hello, > > I created a MFC program which invokes a function generated from a > > .m > > file by matlab. > > > > The problem is: the first time I call this function, it works well. > > But after > > mclTerminateApplication(); > > when I want to call the function for a second time, there is a > > problem with mclInitializeApplication(); > > > > That means, once the mclTerminateApplication() has been executed, > > mclInitializeApplication() fails to be executed again. > > > > Does anyone meet this problem? Thank you very much! > > > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > My problem: The second time I click the button, > > mclInitializeApplication fails to start. > > > > void CDlg::OnBnClicked() > > { > > mclInitializeApplication(NULL,0); > > libTESTInitialize()); > > mlfTEST(); > > libTESTTerminate(); > > mclTerminateApplication(); > > }
From: future star on 11 Jul 2010 03:31 "John Reilly" <jrhokie1@_NOSPAM_yahoo.com> wrote in message <ef53bb6.0(a)webcrossing.raydaftYaTP>... > Hi Jeff, > > The documentation clearly says: > > After you call mclTerminateApplication, you may not call > mclInitializeApplication again. No MathWorks functions may be called > after mclTerminateApplication. > > The page is in the MATLAB Compiler documentation, and is entitled > "Calling a Shared Library" > > john. > > Jeffrey wrote: > > > > > > Hello, > > I created a MFC program which invokes a function generated from a > > .m > > file by matlab. > > > > The problem is: the first time I call this function, it works well. > > But after > > mclTerminateApplication(); > > when I want to call the function for a second time, there is a > > problem with mclInitializeApplication(); > > > > That means, once the mclTerminateApplication() has been executed, > > mclInitializeApplication() fails to be executed again. > > > > Does anyone meet this problem? Thank you very much! > > > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > My problem: The second time I click the button, > > mclInitializeApplication fails to start. > > > > void CDlg::OnBnClicked() > > { > > mclInitializeApplication(NULL,0); > > libTESTInitialize()); > > mlfTEST(); > > libTESTTerminate(); > > mclTerminateApplication(); > > } Hello,John. I have the same problem as Jeffrey.I know what the document says, but I still want to invoke a matlab function in vs2005 several times. What should I do? Is there a method?whether this is a problem that mathworks does't sovle?I'm looking forward to your reply and appreciate your help.
From: Steven Lord on 12 Jul 2010 10:11 "future star" <future_star001(a)163.com> wrote in message news:i1brvp$ki0$1(a)fred.mathworks.com... > "John Reilly" <jrhokie1@_NOSPAM_yahoo.com> wrote in message > <ef53bb6.0(a)webcrossing.raydaftYaTP>... *snip* > Hello,John. I have the same problem as Jeffrey.I know what the document > says, but I still want to invoke a matlab function in vs2005 several > times. What should I do? Is there a method?whether this is a problem that > mathworks does't sovle?I'm looking forward to your reply and appreciate > your help. Initialize once, at the beginning of your application. Call your function as many times as necessary. When you're completely done, THEN terminate. -- Steve Lord slord(a)mathworks.com comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ To contact Technical Support use the Contact Us link on http://www.mathworks.com
|
Pages: 1 Prev: Calculate whether a point is above or below a plane Next: mwcomutil 7.13 help |