|
From: Paul on 18 Jun 2008 21:38 roberson(a)ibd.nrc-cnrc.gc.ca (Walter Roberson) wrote in message <g3b4t2$f93$1(a)canopus.cc.umanitoba.ca>... > In article <g3avsm$5si$1(a)fred.mathworks.com>, > shrithi srivaastav <bharat.k.suthar(a)gmai.com> wrote: > > > I have a exe file (dymosim.exe) giving its output to > >a .mat file. I want to call a matlab function every time > >the file is updated (new values are appended). Is there any > >way to do this? > > If I recall correctly what I have read, NO, there is no way to > do that on Windows (which we can deduce you are using by the file name > extension), not even with a COM or ActiveX object. > > Another poster suggested a busy loop checking file size. Unless your > updates are very small, or unless you are willing to put in a pause() > noticably longer than the expected time before update, then you will > find that approach to be unsatisfactory, because what you want > to detect is not that the file size has changed, but rather that > the other program has *finished* changing the .mat file. > > There are some other options, but they depend upon changing the > behaviour of dymosim > -- > "I like to build things, I like to do things. I am having > a lot of fun." -- Walter Chrysler what about using a Matlab timer with a given time delay (assuming dymosim.exe has an approximate execution time) that calls the matlab routine after the timer stops.
|
Pages: 1 Prev: Display images froma folder in MATLAB GUI Next: structure from motion |