Is there a simple way to spawn a copy of your current MATLAB workspace into a new process/thread?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Chris Esposito
el 10 de Abr. de 2017
Respondida: Chris Esposito
el 18 de Abr. de 2017
If not, is there an unnecessarily complex way to do it? ;)
I've written some code that creates plots from EEG time series data (stored in the workspace). The user navigates between the plots using the keyboard, and this lets them see/compare features between the plots.
The only problem is that it blocks the main thread. Running it in a separate thread would be ideal, but it seems like 'batch' doesn't show plots - and it's slow!
system('matlab') works in creating a new process, but the workspace is empty. It's also quite slow.
Is there a simple way to initialise a new process/thread, with my current workspace, so that I can run the plotting script without blocking execution?
Thanks, ~Chris
0 comentarios
Respuesta aceptada
Jan
el 10 de Abr. de 2017
Editada: Jan
el 10 de Abr. de 2017
What does block the main thread? If you have a bunch of GUIs, the callbacks are processed on demand only. As long as there are no waitfor commands or modal dialogs, nothing is blocked.
A save() command saves all variables in the current workspace to the disk. With load() they can be reloaded in another thread. But I assume, that this indirection is a bad idea. Better create a non-blocking interface.
0 comentarios
Más respuestas (1)
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!