% Creation of a scroll bar (sliders) clear all hfig = figure(1); VMin = 2.5; VMax = 4; VInit = 2.5; hAsc = uicontrol(hfig, ... % handle on graphic window 'style', 'slider', ... % style of button 'position', [200 2 150 20],... % position of button 'min', VMin,... % value of the lower bound 'max', VMax,... % value of the upper bound 'value', VInit, ... % initial value 'callback', [... % actions during the mouvement 'VAsc = num2str(get(hAsc,''value''));'... 'set(hVal,''string'',VAsc);'... 'inter1l']); % display the value hVal = uicontrol(hfig, ... % handle on graphic window 'style', 'text', ... % style of button 'position', [200 22 150 15]); % position of button % display the minimum value TxtMin = uicontrol(hfig, ... % handle on graphic window 'style', 'text', ... % style of button 'position', [180 2 20 20],... % position of button 'string',num2str(VMin)); % display the maximal value TxtMax = uicontrol(hfig, ... % handle on graphic window 'style', 'text', ... % style of button 'position', [350 2 20 20],... % position of button 'string',num2str(VMax)); % Initialisations set(hVal,'string',num2str(VInit)); % "Complex and Chaotic Nonlinear Dynamics. % Advances in Economics and Finance, % Mathematics and Statistics" % T.Vialar, Springer 2009. % Copyright(c).