matlab and c# working with same file
Afficher commentaires plus anciens
Hi. So I have C# application that constantly edits data.txt like this:
while(true){
open data.txt;
overwrite old data with new data;
close data.txt;
wait 1 second;
}
The file always contains one number. While that is happening I'm using matlab to read data.txt like this:
sum = 0;
i = 0;
while(i < 1000){
i = i+1;
open data.txt;
number = read data.txt;
close data.txt;
sum = sum + number;
}
At the end, I always get that sum = []. What should I do to fix this problem? Thank you.
Réponse acceptée
Plus de réponses (1)
Alokin Jago
le 27 Nov 2011
0 votes
Catégories
En savoir plus sur Communications Toolbox 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!