From: Ryan on
Hello,

I have created a GUI that gives me the following error - Reference to non-existent field 'axes1' - but not all the time.

The GUI program I have created scans a data set for the closest matches that fit a certain criteria (the input data set). As it goes along, it plots the closest match along with the input data on the same axes/graph.

All seems to function as expected, except when I stop the scan and then start it up again. If I pause it, it resumes and functions just fine. However, if I stop the entire scan, and start a new one I get that error.

The only code in my entire program that deals with the axes1 object is the following:

plot(handles.axes1,compare,'-b');
hold on
plot(handles.axes1,possible_match,'-r');
hold off

I can't for the life of me figure out why this error only occurs after a scan has been stopped.