function final_mode=mymode(values,frequency)
[numentries,temp]=size(values);
[m1 m2]= max(frequency);
final_mode=values(m2);
endfunction
