Thanks Mario your suggestion helped to an extent.
Friends I am getting following error :
??? Undefined command/function 'findpeaks'.
Error in ==> voc at 37
[pics,indices]=findpeaks(power,'minpeakdistance',25,'sortstr','down');
Can anyone help me out is "findpeak" inbuilt function present in matlab runtime environment or I need to download this file and save it in my source file directory. Thanks.