Is it possible to run two different programs simultaneously using the parallel computing toolbox, where one function is dependent on constantly updating the result of the other?
I have implemented a TCP server receiving data from a micro-controller using the java libraries within MATLAB which works well. I now need to do some computations of varied length on the most recent data set which has arrived, and my proposed solution to this is a First In First Out buffer in my server function which is updating as fast as the data arrives and is readable by my main function.
I have looked at the documentation and examples for matlabpool, parfor, spmd, batch etc. but I am not sure if any of these allow me to run two different programs with shared data.
Any advice would be greatly appreciated, or indeed suggestions of other solutions to this problem. I have included my server code in case it helps.
if true function [DMat] = ServerInit()
number_of_retries = 1;
current_retry = 0;
current_retry = current_retry + 1;
if ((number_of_retries > 0) && (current_retry > number_of_retries))
fprintf(1, 'Too many retries\n');
fprintf(1, 'Retry %d connecting to %s:%d\n', ...
current_retry, host, port);
Server_socket = java.net.ServerSocket(port);
Client_sock = Server_socket.accept();