Matlab + Arduino + Serial freezes (hangs)

Hi. I created a data logger which receives data from arduino for every 1 second. The problem I have is that (while logging data) Matlab unexpectedly and randomly freezes for reasons I do not know. I haven't yet found a fix for this what I do is use the task manager to kill the process. THanks for all the help

Are you sure that it is Matlab that is "freezing"? Perhaps it is the Arduino that quits responding. If you are sure that it is Matlab that is the problem, ask your questions about Matlab on the matleb forum.