% --- Executes on button press in clear.
function clear_Callback(hObject, eventdata, handles)
colorbar off
cla
h=gca;
set(h,'Color','w')
gridplot()
clear global 
reassign()


function reassign()
%reassigns values to certain global variables
global mx my ID BC count incount globcount credit
global analyse_press field_press force_press pot_press cap_press volt_press
mx=80;
my=80;
count=0;
incount=0;
globcount=0;
credit=0;
ID=zeros(mx,my);
BC=zeros(mx,my);

analyse_press=0;
field_press=0;
force_press=0;
pot_press=0;
cap_press=0;
volt_press=0;

HH=findobj(gcf,'Tag','cap');
set(HH,'String',' ')