
fig=createmadfig('wangNeuron'); 
presets = uimenu('Parent',fig, ...
	'Label','Presets', ...
	'Tag','presetMenu');
uimenu('Parent',presets, ...
	'Callback','wangNeuron slowOscPreset', ...
	'Label','Slow oscillation', ...
	'Tag','slowOscChoice');
uimenu('Parent',presets, ...
	'Callback','wangNeuron fastOscPreset', ...
	'Label','Fast oscillation', ...
	'Tag','fastOscChoice');
uimenu('Parent',presets, ...
	'Callback','wangNeuron noOscPreset', ...
	'Label','No oscillation', ...
	'Tag','noOscillationChoice');
fig=createmadmenus(fig);

b = uicontrol('Parent',fig, ...
	'Callback','wangNeuron InputSliderChanged', ...
	'Max',1.5, ...
	'Min',-0.5, ...
	'Position',[0.0977    0.2474    0.3984    0.0547], ...
	'Style','slider', ...
	'Tag','InputSlider');
	
b = uicontrol('Parent',fig, ...
	'BackgroundColor',[1 1 1], ...
	'Callback','wangNeuron InputBoxChanged', ...
	'Position',[0.5078    0.2474    0.1035    0.0521], ...
	'String','0', ...
	'Style','edit', ...
	'Tag','InputBox');
	
b = uicontrol('Parent',fig, ...
	'FontSize',14,...
	'Position',[0.1367    0.9193    0.2773    0.0495], ...
	'String','Phase Plane', ...
	'Style','text', ...
	'Tag','StaticText1');
	
b = uicontrol('Parent',fig, ...
	'FontSize',14,...
	'Position',[0.6328    0.9141    0.2891    0.0469], ...
	'String','Time domain', ...
	'Style','text', ...
	'Tag','StaticText2');
	
b = uicontrol('Parent',fig, ...
	'Callback','wangNeuron doPlot', ...
	'Position',[0.7734    0.0234    0.2031    0.1042], ...
	'String','Begin simulation', ...
	'Tag','beginButton');
	
b = uicontrol('Parent',fig, ...
	'Callback','wangNeuron drawNullclines', ...
	'Position',[0.7695    0.2422    0.2090    0.0521], ...
	'String','Show x nullcline', ...
	'Style','checkbox', ...
	'Tag','xnulltick', ...
	'Value',1);
	
b = uicontrol('Parent',fig, ...
	'Callback','wangNeuron drawNullclines', ...
	'Position',[0.7715    0.1562    0.2070    0.0469], ...
	'String','Show y nullcline', ...
	'Style','checkbox', ...
	'Tag','ynulltick', ...
	'Value',1);
	
b = uicontrol('Parent',fig, ...
	'Callback','wangNeuron EtaSliderChanged', ...
	'Max',0.5, ...
	'Min',0.01, ...
	'Position',[0.0977    0.1771    0.3984    0.0547], ...
	'Style','slider', ...
	'Tag','EtaSlider', ...
	'Value',0.05);
	
b = uicontrol('Parent',fig, ...
	'Callback','wangNeuron BetaSliderChanged', ...
	'Min',0.01, ...
	'Position',[0.0977    0.1016    0.3984    0.0547], ...
	'Style','slider', ...
	'Tag','BetaSlider', ...
	'Value',0.1);
	
b = uicontrol('Parent',fig, ...
	'Callback','wangNeuron GammaSliderChanged', ...
	'Max',20, ...
	'Min',1, ...
	'Position',[0.0977    0.0312    0.3984    0.0547], ...
	'Style','slider', ...
	'Tag','GammaSlider', ...
	'Value',6);
	
b = uicontrol('Parent',fig, ...
	'BackgroundColor',[1 1 1], ...
	'Callback','wangNeuron EtaBoxChanged', ...
	'Position',[0.5078    0.1797    0.1035    0.0521], ...
	'String','0.05', ...
	'Style','edit', ...
	'Tag','EtaBox');
	
b = uicontrol('Parent',fig, ...
	'BackgroundColor',[1 1 1], ...
	'Callback','wangNeuron BetaBoxChanged', ...
	'Position',[0.5078    0.1042    0.1035    0.0521], ...
	'String','0.1', ...
	'Style','edit', ...
	'Tag','BetaBox');
	
b = uicontrol('Parent',fig, ...
	'BackgroundColor',[1 1 1], ...
	'Callback','wangNeuron GammaBoxChanged', ...
	'Position',[0.5059    0.0339    0.1035    0.0521], ...
	'String','6', ...
	'Style','edit', ...
	'Tag','GammaBox');
	
b = uicontrol('Parent',fig, ...
	'Position',[0.0195    0.2500    0.0645    0.0495], ...
	'String','Input', ...
	'Style','text', ...
	'Tag','StaticText3');
	
b = uicontrol('Parent',fig, ...
	'Position',[0.0176    0.1823    0.0645    0.0417], ...
	'String','Eta', ...
	'Style','text', ...
	'Tag','StaticText4');
	
b = uicontrol('Parent',fig, ...
	'Position',[0.0117    0.1094    0.0703    0.0365], ...
	'String','Beta', ...
	'Style','text', ...
	'Tag','StaticText5');
	
b = uicontrol('Parent',fig, ...
	'Position',[0.0117    0.0365    0.0723    0.0391], ...
	'String','Gamma', ...
	'Style','text', ...
	'Tag','StaticText6');
	
b = axes('Parent',fig, ...
	'Box','on', ...
	'CameraUpVector',[0 1 0], ...
	'CameraUpVectorMode','manual', ...
	'Color',[1 1 1], ...
	'NextPlot','add', ...
	'Position',[0.5781    0.3958    0.4004    0.5000], ...
	'Tag','TimeAxes', ...
	'XColor',[0 0 0], ...
	'XLim',[1 1000], ...
	'XLimMode','manual', ...
	'YColor',[0 0 0], ...
	'YLim',[-3 3], ...
	'YLimMode','manual', ...
	'ZColor',[0 0 0], ...
	'ZLimMode','manual');
	

xlabel('Time [integration steps]');
ylabel('x activity');

	
b = axes('Parent',fig, ...
	'Box','on', ...
	'CameraUpVector',[0 1 0], ...
	'CameraUpVectorMode','manual', ...
	'Color',[1 1 1], ...
	'NextPlot','add', ...
	'Position',[0.0781    0.3958    0.4023    0.5052], ...
	'Tag','PhaseAxes', ...
	'XColor',[0 0 0], ...
	'XLim',[-3 3], ...
	'XLimMode','manual', ...
	'YColor',[0 0 0], ...
	'YLim',[-1 7], ...
	'YLimMode','manual', ...
	'ZColor',[0 0 0], ...
	'ZLimMode','manual');
	
xlabel('x activity');
ylabel('y activity');



