MATLAB: Any function like kbhit

kbhit

Hi all Is there any function like kbhit(in C) in matlab. I want to use that function inside the for loop to terminate the loop. Thanks in advance
for i=1:100000
if kbhit == 'q'
break;
end
end
Related Question