, , . (, C), , MATLAB, , . , ...
, - ( "" ), "master" (.. "" ) .
, , . , MATLAB. , (process_fcn) :
"master" . ( labindex process_fcn:
if (labindex == 1),
fid = fopen('log.txt','at'); %
end
, , , datastrong > , . , try-catch , .
process_fcn ( , ), , (.. ), "" . "" . , ( labBarrier, labProbe, labSend labReceive):
labBarrier; %
if (labindex == 1), %
if ~isempty(data),
fprintf(fid,'%s\n',data); %
end
pause(1); %
while labProbe, %
data = labReceive; %
fprintf(fid,'%s\n',data);
end
else %
if ~isempty(data),
labSend(data,1); %
end
end
data = ''; %
PAUSE , labSend "" , "" .
, "master" . process_fcn:
if (labindex == 1),
fclose(fid);
end