system file watch crash
Afficher commentaires plus anciens
fsw = System.IO.FileSystemWatcher();
fsw.Path = 'C:\Users\wolfgang\Desktop';
fsw.Filter = 'NZDUSD1.csv';
fsw.EnableRaisingEvents = true;
listenerhandle = addlistener(fsw, 'Changed', @(~,~)importfcn(q,a));
%signature of importfcn is function importfcn(sender, eventargs)
%add a small delay in importfcn before reading the file as the event is raised
%to make sure that file modification is complete
When I run this file, .csv file gets imported every minute and then processed. Sometimes, the imported file is still processed and the next import is delayed. This leads to the delay of several files.
In the end my matlab crashed and I get an error message. How can I resolve this problem?
2 commentaires
Guillaume
le 26 Jan 2015
What is the error message?
AA
le 26 Jan 2015
Modifié(e) : Star Strider
le 26 Jan 2015
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Startup and Shutdown dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!