matlab and c# working with same file
Mostrar comentarios más antiguos
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.
Respuesta aceptada
Más respuestas (1)
Alokin Jago
el 27 de Nov. de 2011
0 votos
Categorías
Más información sobre Communications Toolbox en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!