RosettaCodeData/Task/Handle-a-signal/MATLAB/handle-a-signal-2.m
2015-02-20 00:35:01 -05:00

14 lines
211 B
Matlab

function sigintHandle
k = 1;
tic
try
while true
pause(0.5)
fprintf('%d\n', k)
k = k+1;
end
catch me
toc
rethrow me
end
end