From: IƱigo San Aniceto on
Hello,

I am quite new in Matlab and I have a problem with a real time MultiCore application. The problem is the following. In each iteration I need to process a large amount of data and display it. Each iteration takes about 1 seg and process 20 samples. To do that I first load the data into the cores and then process in a loop. The problem is that first it process and then it display so it is not a continuous display 1sample/0.05seg. Any idea of how to do it? I tried with parallel jobs but I did not succed.

%Load data to Cores
spmd (NumberCores)
len=len0;
necmodel=nmodel;
n = size(necmodel.V,1); % tikhonov
[p,noData] = size(necmodel.s);
cortexV=zeros(len,1); % Prealocation
electrodesV3=electrodesV2;
sourceminmax = [realmax realmin];
cortexVmat=zeros(len,itinsideworkers);
end

%Real time
cortexVhipermat=zeros(NumberCores,len0,itinsideworkers);
for it=1:itoutsideworkers

spmd (NumberCores)
for i=1:itinsideworkers
... % Other processing
cortexVmat(:,i) = (cortexV-sourceminmax(1))*coef; %Output
end
end %spmd

%% Plot workers
for lab=1:NumberCores
cortexVhipermat(lab,:,:)=cell2mat(cortexVmat(1,lab));
for pl=1:itinsideworker
nzK = cortexVhipermat(lab,:,pl) > handles.Data.Threshold;
FaceVertexCData = cmap(round(63*cortexVhipermat(lab,:,pl)+1),:);
set(modelhandles.cortex,'FaceVertexCData',FaceVertexCData);
pause(0.0001);
end
end
end
 | 
Pages: 1
Prev: Intelligent solution for bad pixels
Next: help