Recording Voice from Mic in Matlab

Below is sample code for recording voice from mic in matlab: