Alternative to Save and Load
10 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hey guys I have this problem:
I have two different MATLAB Sessions, which are exchanging data. The first session saves a variable 'count' at a random moment I don't know before, and the second session continuously loads this exact variable (it exists before the first session has uploaded it, but hasn't reached the right value yet). So in the end this happens: while one session continuously refreshes 'count' by loading it over and over again, the other session uploads it at a random time, and my suggestion is that in the very short moment of session one uploading it, it isn't readable for session two, which is why I get an error. (error messages vary between 'not an ASCII' and 'file is corrupt'.
I don't get this error every time, but in need 'count' to be exchanges way too often to accept it crashing once in a while.
I should also say: I am using a Remote Control version of Matlab 2018, which is why I can't exchange any data on my local computer.
Thanks for any help!!
0 comentarios
Respuestas (1)
Ameer Hamza
el 16 de Sept. de 2020
Try this method: https://www.mathworks.com/help/matlab/import_export/share-memory-between-applications.html. Otherwise, try using a try-catch block to ignore the cases when the file cannot be loaded in session 2.
0 comentarios
Ver también
Categorías
Más información sobre Shifting and Sorting Matrices en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!