Solved the problem by having a pause in the loop
while ishandle(g) %Loop when Plot is Active
dat = fscanf(s)
fprintf(fid, '%s\r\n', dat);
This question is closed. Reopen it to edit or answer.
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!