i did not find the define of the function in matlab, do you have the define of the function?? "mainmenu"Do you really expect someone to look through a partial listing of unformatted code, especially when you have a glaring error telling you that you have a function that is not defined? How about at least spending some effort to define the function, first?