i have a problem with libpointer and parfor loops. I want to access several USB cable(same time) with callib(read/write) but i need libpointer for them.
If i try to open the channel and init the channel before parfor loop, i cant use the libpointer inside because they disappear.
Is there any way to access libpointer inside parfor loop without to open/init/close the whole usb channel each time ?
% here some description
%open the channel and save the pointer under pChannelHandleArr
% init the channel with given pChannelHandle
%transfer data to USB or read USB(SPI_Read) with given pChannelHandle
%clse channel with given handleArr
if my communication is every 500ms then i need to do this all again.
here is a small example of libpointer and my problem
fprintf(' before loop');
%create var as libpointer
pNumchannels = libpointer('uint32Ptr',255);
fprintf(' LOOP BEGINN');
%the var pNumchannels is empty here, the pointer is not there anymore
is there any way to open the channel, save the pointer var and use it inside parfor loops?