How can I collect 3d-data while a Matlab-GUI is in process?

2 views (last 30 days)
Hello,
I have manage to connect a 3d-data-collector device with Matlab. Actually I get the 3-d data that device collects through Matlab. When I run my code a Matlab GUI appears on the screen and on the first touch of the user on the screen I enable the 3d-data recording procedure on the device. I want GUI and data collection to run in parallel, but they don't. When data collection starts Gui does not work properly. I use matlabpool but still it does not work as I want. Here is my code:
matlabpool open 4; % Use default parallel configuration
spmd % By default uses all labs in the pool
strct.socket = libclient('0.0.0.0', 7234, 2);
end
matlabpool close;
set( a.uipanel1 ,'Visible', 'off')
set( a.uipanel2 ,'Visible', 'on')
This is the code that there is in uipanel1_ButtonDownFcn. After that function I want to collect data continually until I will stop the application and I also want uipanels of my intreface to alternate there visibility non-stop until I will stop the application.
Do you think I should use a different method instead of matlabpool or it is correct but there is something wrong with my code?
Thank you....

Answers (0)

Categories

Find more on Interactive Control and Callbacks in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!