|
Hello,
I am facing problem in making matlab wait for an exe file to finish process. I am using
! command to call the exe file. I will need an output file file from this process so that I can use it in the matlab script to carry on further process.
This is the command im using to call the 'fluent' .exe
!'C:\Fluent.Inc\n tbin\win64\fluent.exe -r6 .3.26 3ddp -i "fluent2.jou"'
What should I do for the matlab to wait?
Thanks,
Priyanka
"Luigi Giaccari" <giaccariluigi@msn.com> wrote in message <h6dj4f$3aa$1@fred.mathworks.com>...
> "Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <h6ckur$ll$1@fred.mathworks.com>...
> > "Luigi Giaccari" <giaccariluigi@msn.com> wrote in message <h6cesa$mm6$1@fred.mathworks.com>...
> > > I am using a .exe file do to some computation. The problem I have is that launching the.exe file eith the ! command do not stop the m-code script exexution.
> > > SO the the script continues to run without waiting for the .exe to finish.
> > >
> >
> > Luigi,
> >
> > If don't add the "&" sign it should wait until the command finishes. Try this two commands (then type something, then Ctrl C to terminate)
> >
> > >> !more
> > >> !more &
> >
> > If your exe returns right the way then I guess because it launches an independent process on its own.
> >
> > Bruno
>
> Thank you Bruno, You are right
>
> I was using
>
> !program.exe&
>
> Removing the & it works, it is easier than I thought.
>
> Thank you
|